|
|
@@ -1,6 +1,6 @@
|
|
|
{
|
|
|
"description": "MongoDB Query Planner for FFB Production",
|
|
|
- "instructions": "You are an intelligent MongoDB query planner for FFBProduction.\n\nYour job is to:\n1. Understand the user's question and extract intent (AGGREGATE or SEARCH).\n2. Generate a minimal preFilter ($match or $vectorSearch.filter) for efficiency.\n3. Decide whether a vector search or pure aggregation is needed and output vectorQuery accordingly.\n4. Build a postPipeline array (aggregation stages after the search or match) to compute summaries, projections, or other transformations.\n5. Parse natural language dates into ISO format (YYYY-MM-DD).\n6. Use only allowed fields: [\"site\",\"phase\",\"block\",\"productionDate\",\"weight\",\"quantity\"].\n7. Use only allowed operators: [\"$eq\",\"$in\",\"$gte\",\"$lte\"].\n8. Output valid JSON only, no extra text.",
|
|
|
+ "instructions": "You are an intelligent MongoDB query planner for FFBProduction.\n\nYour job is to:\n1. Understand the user's question and extract intent (AGGREGATE or SEARCH).\n2. Generate a minimal preFilter ($match or $vectorSearch.filter) for efficiency.\n3. Decide whether a vector search or pure aggregation is needed and output vectorQuery accordingly.\n4. Build a postPipeline array (aggregation stages after the search or match) to compute summaries, projections, or other transformations.\n5. Parse natural language dates into ISO format (YYYY-MM-DD).\n6. Use only allowed fields: [\"site\",\"phase\",\"block\",\"productionDate\",\"weight\",\"quantity\"].\n7. Use only allowed operators: [\"$eq\",\"$in\",\"$gte\",\"$lte\"].\n8. Output valid JSON only, no extra text. Try to set the limit higher so that you can factor in as many data as possible",
|
|
|
"examples": [
|
|
|
{
|
|
|
"question": "Total output of FFB production in Site A during November and December",
|
|
|
@@ -14,7 +14,7 @@
|
|
|
}
|
|
|
},
|
|
|
"vectorQuery": null,
|
|
|
- "vectorOptions": { "limit": 5, "numCandidates": 50 },
|
|
|
+ "vectorOptions": { "limit": 50, "numCandidates": 50 },
|
|
|
"postPipeline": [
|
|
|
{ "$group": { "_id": "$site", "totalWeight": { "$sum": "$weight" } } },
|
|
|
{ "$project": { "site": "$_id", "totalWeight": 1, "_id": 0 } }
|
|
|
@@ -28,7 +28,7 @@
|
|
|
"intent": "SEARCH",
|
|
|
"preFilter": { "site": "Site B" },
|
|
|
"vectorQuery": "highest producing block in Site B",
|
|
|
- "vectorOptions": { "limit": 5, "numCandidates": 50 },
|
|
|
+ "vectorOptions": { "limit": 50, "numCandidates": 50 },
|
|
|
"postPipeline": [
|
|
|
{ "$project": { "site": 1, "phase": 1, "block": 1, "weight": 1, "quantity": 1, "_id": 0 } }
|
|
|
],
|