Spaces:
Sleeping
Sleeping
Commit History
-
Simplify topology to 3 agents + 2 tools
Folded the Validator's deterministic layer into the Planner (post-LP check_plan with up to 2 internal revisions) and its LLM-graded layer into the Coach's self-review. Removed the standalone KnowledgeAgent — the WebSearchTool now uses Gemini's grounded google_search natively, which returns source URIs in grounding_metadata. Dropped the LLM-driven ComputationTool / AST sandbox; the MedicalAssessmentAgent now runs nutrition_formulas.full_assessment() directly and overwrites the LLM's calculations with the deterministic result. Tightened the Coach decision schema: call_tool is no longer a valid action, PlannerToolName is a strict Literal of {WebSearchTool, QuantitiesFinder}, MedicalAssessmentDecision drops tool_name. The QuantitiesFinder LP gets default per-food bounds (min = max(20, est*0.3), max = min(400, est*2.5)) and the estimate-anchor weight bumps 0.1 -> 0.3 so the solver stops drifting into 1 g of butter / 900 g of broccoli. End-to-end audit against a real Gemini key: Coach -> M…1933348
-
Phase 6: Observability + offline eval harness
observability.py * init_langsmith() honours the standard LANGCHAIN_TRACING_V2 / LANGCHAIN_API_KEY env vars; off by default; logs a one-liner if on so the user knows tracing is live. * MetricsCollector singleton: per-agent and per-tool {calls, total_seconds, last_seconds, errors}. snapshot() also folds in the Phase 1 ParseMetrics (native vs fallback vs failure parses, by model). Phase 7's UI renders this as a live system-health pane. * span(label, kind='agent'|'tool'|'misc') context manager: times a block, records into the collector, emits a ⏱ debug line. evals/ * fixtures.py: three personas tuned to exercise the main risk axes: - Athlete -> macro_split protein floor (≥ 1.6 g/kg). - Diabetic -> requires_human_review propagation, calorie ceiling. - Vegan budget -> exclusions (peanut allergy, vegan), regional cues. * runner.py: walks each fixture WITHOUT calling Gemini -- builds the assessment via nutrition_formulas, hand-builds a plan that hits target, runs the …1ea0743