Skip to content

Decision Engine

The Decision Engine helps you make complex decisions based on specific criteria and constraints.

const decisionResponse = await exnest.structuredDecision(
[
{ role: "user", content: "Should we migrate our database to NoSQL?" }
],
{
decisionType: "technical_architecture",
criteria: ["scalability", "maintainability", "cost"],
constraints: ["must be open source", "budget < $500/month"]
}
);
console.log(decisionResponse.choices[0].message.content);
Terminal window
curl -X POST https://api.exnest.app/v1/ebc/structured-decision \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{
"role": "user",
"content": "Help me choose between job offers from Google and Microsoft"
}
],
"context": {
"decisionType": "career_choice",
"criteria": [
"salary_comparison",
"growth_opportunities",
"work_life_balance",
"company_culture",
"learning_opportunities"
],
"timeframe": "immediate",
"priority": "high",
"constraints": [
"must_relocate",
"family_considerations"
],
"preferences": {
"risk_tolerance": "medium",
"career_stage": "mid-level",
"work_style": "collaborative"
}
},
"max_tokens": 2000,
"exnest_metadata": true
}'