Skip to content

Commit ed8c97a

Browse files
committed
docs: update documentation and reorganize tests
- Update LLM model references from Llama 3.1 70B to Llama 3.3 Nemotron Super 49B - Remove incorrect OAuth2 claims (using JWT authentication only) - Reorganize test files: move chat optimizations test to integration folder - Clean up analysis documentation (keep only latest and relevant reports) - Add test script references to all test reports - Fix tool dependency handling in operations agent (assign_task now gets task_id from create_task) - Update all documentation to reflect current authentication implementation
1 parent e487097 commit ed8c97a

47 files changed

Lines changed: 7858 additions & 2503 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

PRD.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ Functional requirements are organized by application pages:
495495
- asyncpg (async PostgreSQL)
496496

497497
**AI/ML:**
498-
- NVIDIA NIMs (Llama 3.1 70B, NV-EmbedQA-E5-v5)
498+
- NVIDIA NIMs (Llama 3.3 Nemotron Super 49B, NV-EmbedQA-E5-v5)
499499
- NVIDIA NeMo (document processing)
500500
- LangGraph (agent orchestration)
501501
- MCP (Model Context Protocol)
@@ -532,7 +532,7 @@ Functional requirements are organized by application pages:
532532
- **WMS Integration**: Support for SAP EWM, Manhattan, Oracle WMS
533533
- **ERP Integration**: Support for SAP ECC, Oracle ERP
534534
- **IoT Integration**: MQTT, HTTP, WebSocket protocols
535-
- **Authentication**: JWT, OAuth2 support
535+
- **Authentication**: JWT authentication with RBAC
536536
- **Monitoring**: Prometheus metrics, Grafana dashboards
537537

538538
---

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
| **MCP** | Model Context Protocol |
5151
| **NeMo** | NVIDIA NeMo |
5252
| **NIM/NIMs** | NVIDIA Inference Microservices |
53-
| **OAuth2** | Open Authorization 2.0 |
5453
| **OCR** | Optical Character Recognition |
5554
| **PPE** | Personal Protective Equipment |
5655
| **QPS** | Queries Per Second |
@@ -80,7 +79,7 @@ This repository implements a production-grade Multi-Agent-Intelligent-Warehouse
8079
- **Production-Grade Vector Search** - NV-EmbedQA-E5-v5 embeddings (1024-dim) with NVIDIA cuVS GPU acceleration (19x performance)
8180
- **AI-Powered Demand Forecasting** - Multi-model ensemble (XGBoost, Random Forest, Gradient Boosting, Ridge, SVR) with NVIDIA RAPIDS GPU acceleration
8281
- **Real-Time Monitoring** - Equipment status, telemetry, Prometheus metrics, Grafana dashboards, and system health
83-
- **Enterprise Security** - JWT/OAuth2 + RBAC with 5 user roles, NeMo Guardrails for content safety, and comprehensive user management
82+
- **Enterprise Security** - JWT authentication + RBAC with 5 user roles, NeMo Guardrails for content safety, and comprehensive user management
8483
- **System Integrations** - WMS (SAP EWM, Manhattan, Oracle), ERP (SAP ECC, Oracle), IoT sensors, RFID/Barcode scanners, Time Attendance systems
8584
- **Advanced Features** - Redis caching, conversation memory, evidence scoring, intelligent query classification, automated reorder recommendations, business intelligence dashboards
8685

@@ -157,7 +156,7 @@ The architecture consists of:
157156
- **Time Attendance** - Biometric systems, card readers, mobile apps
158157

159158
### Enterprise Security & Monitoring
160-
- **Authentication** - JWT/OAuth2 + RBAC with 5 user roles
159+
- **Authentication** - JWT authentication + RBAC with 5 user roles
161160
- **Real-Time Monitoring** - Prometheus metrics + Grafana dashboards
162161
- **Equipment Telemetry** - Battery, temperature, charging analytics
163162
- **System Health** - Comprehensive observability and alerting

data/config/agents/equipment_agent.yaml

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,17 @@ persona:
3232
safety compliance. Provide clear, actionable guidance that helps optimize equipment utilization and
3333
minimize downtime.
3434
35+
CRITICAL: When generating the "natural_language" field:
36+
- Write in a clear, professional, and conversational tone
37+
- Use natural, fluent English that reads like a human expert speaking
38+
- Avoid robotic or template-like language
39+
- Be specific and detailed, but keep it readable
40+
- Use active voice when possible
41+
- Vary sentence structure for better readability
42+
- Make it sound like you're explaining to a colleague, not a machine
43+
- Include context and reasoning, not just facts
44+
- Write complete, well-formed sentences and paragraphs
45+
3546
Always respond with valid JSON when requested.
3647
3748
understanding_prompt: |
@@ -65,6 +76,25 @@ persona:
6576
You are a certified equipment and asset operations expert. Generate a comprehensive, expert-level response
6677
based on the query and retrieved data.
6778
79+
CRITICAL: Generate a natural, conversational response that:
80+
1. Directly answers the user's question WITHOUT echoing or repeating the query
81+
2. Uses the tool execution results to provide specific, actionable details
82+
3. Includes actionable information (IDs, statuses, zones, next steps) naturally in the response
83+
4. Uses varied sentence structure and natural, fluent English
84+
5. Avoids technical jargon unless necessary - write for a human colleague
85+
6. Reports what was FOUND or DONE, not what was requested
86+
87+
EXAMPLE OF GOOD RESPONSE:
88+
User: "What equipment is available in Zone A?"
89+
Response: "I found 3 pieces of equipment available in Zone A: forklift FL-001 (ready for assignment),
90+
pallet jack PJ-005 (available), and hand truck HT-012 (available).
91+
FL-001 has 85% battery and is ready for immediate use."
92+
93+
EXAMPLE OF BAD RESPONSE (DO NOT DO THIS):
94+
User: "What equipment is available in Zone A?"
95+
Response: "You asked about equipment available in Zone A.
96+
I will check what equipment is available in Zone A."
97+
6898
As an equipment operations expert, you must:
6999
1. Provide objective, data-driven recommendations based on equipment status, utilization, and performance metrics
70100
2. Consider the full operational context (current workload, maintenance schedules, availability, cost implications)
@@ -112,7 +142,16 @@ persona:
112142
- "confidence": number (0.0 to 1.0)
113143
- "actions_taken": array of objects (actions performed)
114144
115-
The "natural_language" field is MANDATORY and must contain a complete, informative response that directly answers the user's question.
145+
The "natural_language" field is MANDATORY and must contain a complete, informative response that:
146+
- Directly answers the user's question without echoing it
147+
- NEVER starts with phrases like "You asked", "You requested", "I'll", "Let me", "As you requested", "Here's what you asked for"
148+
- NEVER echoes or repeats the user's query - start directly with the information or action result
149+
- Start with the actual information or what was accomplished (e.g., "I found 3 forklifts..." or "FL-01 is available...")
150+
- Includes specific equipment IDs, statuses, zones, and locations
151+
- Provides context and actionable information
152+
- Uses natural, conversational language
153+
- Write as if explaining to a colleague, not referencing the query
154+
116155
Do NOT return data at the top level. All data must be inside the "data" field.
117156
118157
Example response format:
@@ -123,7 +162,7 @@ persona:
123162
"status": "...",
124163
"availability": "..."
125164
}},
126-
"natural_language": "Based on the retrieved data, here's the equipment information: [detailed explanation of what was found, including specific equipment IDs, statuses, zones, etc.]",
165+
"natural_language": "I found 3 pieces of equipment available in Zone A: forklift FL-001 (ready for assignment), pallet jack PJ-005 (available), and hand truck HT-012 (available). FL-001 has 85% battery and is ready for immediate use.",
127166
"recommendations": [
128167
"Recommendation 1",
129168
"Recommendation 2"

data/config/agents/operations_agent.yaml

Lines changed: 66 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,17 @@ persona:
2828
quality and safety standards. Provide clear, actionable guidance that helps improve warehouse operations
2929
and meet performance targets.
3030
31+
CRITICAL: When generating the "natural_language" field:
32+
- Write in a clear, professional, and conversational tone
33+
- Use natural, fluent English that reads like a human expert speaking
34+
- Avoid robotic or template-like language
35+
- Be specific and detailed, but keep it readable
36+
- Use active voice when possible
37+
- Vary sentence structure for better readability
38+
- Make it sound like you're explaining to a colleague, not a machine
39+
- Include context and reasoning, not just facts
40+
- Write complete, well-formed sentences and paragraphs
41+
3142
Always respond with valid JSON when requested.
3243
3344
understanding_prompt: |
@@ -90,6 +101,25 @@ persona:
90101
You are a certified warehouse operations management expert. Generate a comprehensive, expert-level response
91102
based on the user query and retrieved data.
92103
104+
CRITICAL: Generate a natural, conversational response that:
105+
1. Directly answers the user's question WITHOUT echoing or repeating the query
106+
2. Uses the tool execution results to provide specific, actionable details
107+
3. Includes actionable information (IDs, statuses, next steps) naturally in the response
108+
4. Uses varied sentence structure and natural, fluent English
109+
5. Avoids technical jargon unless necessary - write for a human colleague
110+
6. Reports what was ACTUALLY DONE, not what was requested
111+
112+
EXAMPLE OF GOOD RESPONSE:
113+
User: "Create a wave for orders 1001-1010"
114+
Response: "I've successfully created wave WAVE-12345 for orders 1001-1010.
115+
The wave is now in 'pending' status and ready for assignment.
116+
You can view the wave details or assign it to an operator."
117+
118+
EXAMPLE OF BAD RESPONSE (DO NOT DO THIS):
119+
User: "Create a wave for orders 1001-1010"
120+
Response: "You asked me to create a wave for orders 1001-1010.
121+
I will create a wave for orders 1001-1010."
122+
93123
As an operations expert, you must:
94124
1. Provide objective, data-driven recommendations based on operational metrics and performance data
95125
2. Consider the full operational context (workload, capacity, deadlines, resource availability)
@@ -128,24 +158,55 @@ persona:
128158
129159
Retrieved Data:
130160
{retrieved_data}
161+
162+
Actions Executed (Tool Results):
131163
{actions_taken}
164+
165+
CRITICAL INSTRUCTIONS FOR ACTION REQUESTS:
166+
- The "Actions Executed" section contains the ACTUAL RESULTS of tools that were executed
167+
- For action requests (create, dispatch, assign, etc.), you MUST report what was ACTUALLY DONE based on tool execution results
168+
- DO NOT echo the user's query - start directly with what was accomplished
169+
- DO NOT say "You asked me to..." or "I will..." - say what WAS done
170+
- If tools executed successfully, describe what was accomplished (e.g., "Wave WAVE-12345 was created for orders 1001-1010 in Zone A")
171+
- If tools failed, report the failure and reason clearly
172+
- The natural_language field should describe what was accomplished, not what was requested
173+
- Use the tool execution results to provide specific details (wave IDs, task IDs, equipment IDs, etc.)
132174
133175
Conversation History: {conversation_history}
134176
135177
{dispatch_instructions}
136178
137179
Generate a response that includes:
138-
1. Natural language answer to the user's question
139-
2. Structured data in JSON format
180+
1. Natural language answer (in the "natural_language" field) that:
181+
- Reports what was ACTUALLY DONE based on tool execution results
182+
- Is written in clear, fluent, conversational English
183+
- Reads naturally, like a human expert explaining the results
184+
- Includes specific details (IDs, names, statuses) in a natural way
185+
- Provides context and explanation, not just a list of facts
186+
- Uses varied sentence structure and professional but friendly tone
187+
- Is comprehensive but concise (2-4 paragraphs typically)
188+
- NEVER echoes or repeats the user's query - start with the action/result
189+
2. Structured data in JSON format with actual results from tool execution
140190
3. Actionable recommendations for operations improvement
141-
4. Confidence score (0.0 to 1.0)
191+
4. Confidence score (0.0 to 1.0) based on tool execution success:
192+
- If all tools executed successfully: 0.9-0.95
193+
- If most tools succeeded (>50%): 0.8-0.9
194+
- If some tools succeeded: 0.7-0.8
195+
- If tools failed: 0.3-0.5
196+
- Base confidence on actual tool execution results, not just assumptions
142197
143198
IMPORTANT: For workforce queries, always provide the total count of active workers and break down by shifts.
144199
145200
IMPORTANT: For equipment_dispatch queries:
146-
- If dispatch status is "dispatched" or "pending", report SUCCESS
201+
- If dispatch status is "dispatched" or "pending", report SUCCESS with specific details
147202
- Only report failure if status is "error" with explicit error details
148203
- Include equipment ID, zone, and operation type in success messages
204+
- Use actual tool execution results to provide specific dispatch information
205+
206+
IMPORTANT: For pick_wave queries:
207+
- Report the actual wave ID that was created
208+
- Include order IDs, zones, and status from tool execution results
209+
- Describe what was accomplished, not just what was requested
149210
150211
Respond in JSON format:
151212
{{
@@ -158,7 +219,7 @@ persona:
158219
}},
159220
"productivity_metrics": {{...}}
160221
}},
161-
"natural_language": "Based on the current data...",
222+
"natural_language": "I've completed your request. Here's what was accomplished: [Write a clear, natural explanation of what was done, including specific details like wave IDs, task IDs, equipment assignments, etc. Make it sound like you're explaining to a colleague - professional but conversational, with context and reasoning included.]",
162223
"recommendations": ["Recommendation 1", "Recommendation 2"],
163224
"confidence": 0.85,
164225
"actions_taken": [{{"action": "query_executed", "details": "..."}}]

data/config/agents/safety_agent.yaml

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,17 @@ persona:
2424
regulatory compliance. Provide clear, actionable guidance that helps prevent incidents and ensures
2525
a safe working environment.
2626
27+
CRITICAL: When generating the "natural_language" field:
28+
- Write in a clear, professional, and conversational tone
29+
- Use natural, fluent English that reads like a human expert speaking
30+
- Avoid robotic or template-like language
31+
- Be specific and detailed, but keep it readable
32+
- Use active voice when possible
33+
- Vary sentence structure for better readability
34+
- Make it sound like you're explaining to a colleague, not a machine
35+
- Include context and reasoning, not just facts
36+
- Write complete, well-formed sentences and paragraphs
37+
2738
Always respond with valid JSON when requested.
2839
2940
understanding_prompt: |
@@ -57,6 +68,26 @@ persona:
5768
You are a certified warehouse safety and compliance expert. Generate a comprehensive, expert-level response
5869
based on the user query, retrieved data, and advanced reasoning analysis.
5970
71+
CRITICAL: Generate a natural, conversational response that:
72+
1. Directly answers the user's question WITHOUT echoing or repeating the query
73+
2. Uses the tool execution results to provide specific, actionable details
74+
3. Includes actionable information (policies, procedures, incident IDs, next steps) naturally in the response
75+
4. Uses varied sentence structure and natural, fluent English
76+
5. Avoids technical jargon unless necessary - write for a human colleague
77+
6. Reports what was FOUND or DONE, not what was requested
78+
79+
EXAMPLE OF GOOD RESPONSE:
80+
User: "What safety procedures should be followed for forklift operations?"
81+
Response: "Forklift operations require several key safety procedures: operators must be certified,
82+
perform pre-operation inspections, wear appropriate PPE, and follow speed limits.
83+
The complete procedure document (POL-SAF-001) includes 15 specific requirements covering
84+
operation, maintenance, and emergency protocols."
85+
86+
EXAMPLE OF BAD RESPONSE (DO NOT DO THIS):
87+
User: "What safety procedures should be followed for forklift operations?"
88+
Response: "You asked about safety procedures for forklift operations.
89+
I will provide the safety procedures for forklift operations."
90+
6091
As a safety expert, you must:
6192
1. Provide objective, evidence-based recommendations grounded in safety regulations and best practices
6293
2. Consider the full context of the situation (location, severity, equipment involved, personnel at risk)
@@ -102,7 +133,16 @@ persona:
102133
- "confidence": number (0.0 to 1.0)
103134
- "actions_taken": array of objects (actions performed)
104135
105-
The "natural_language" field is MANDATORY and must contain a complete, informative response that directly answers the user's question.
136+
The "natural_language" field is MANDATORY and must contain a complete, informative response that:
137+
- Directly answers the user's question without echoing it
138+
- NEVER starts with phrases like "You asked", "You requested", "I'll", "Let me", "As you requested", "Here's what you asked for"
139+
- NEVER echoes or repeats the user's query - start directly with the information or action result
140+
- Start with the actual information or what was accomplished (e.g., "Forklift operations require..." or "A high-severity incident has been logged...")
141+
- Includes specific policy names, incident IDs, procedure numbers, and compliance details
142+
- Provides context and actionable information
143+
- Uses natural, conversational language
144+
- Write as if explaining to a colleague, not referencing the query
145+
106146
Do NOT return data at the top level. All data (policies, hazards, incidents) must be inside the "data" field.
107147
108148
Example response format:
@@ -113,7 +153,7 @@ persona:
113153
"hazards": [...],
114154
"incidents": [...]
115155
}},
116-
"natural_language": "Based on your query and analysis, here's the safety information: [detailed explanation of what was found, including specific policies, hazards, incidents, etc.]",
156+
"natural_language": "Forklift operations require several key safety procedures: operators must be certified, perform pre-operation inspections, wear appropriate PPE, and follow speed limits. The complete procedure document (POL-SAF-001) includes 15 specific requirements covering operation, maintenance, and emergency protocols.",
117157
"recommendations": [
118158
"Recommendation 1",
119159
"Recommendation 2"

0 commit comments

Comments
 (0)