Hybrid retrieval with grounding
Dense embeddings and BM25 run side by side and are fused by reciprocal rank; short queries are expanded from the corpus's own headings. Every answer cites a document and heading, and the search reports whether it found evidence at all.
Falls back to lexical-only and says so when no embedding cache is present.
services/knowledge.py · harness/knowledge_mcp_server.py
Context engineering
Each page agent gets a compiled context: its charter, its skill notes, a snapshot of what is on screen, and a token budget set per surface.
`python -m harness.evals.page_agent --policy` prints the lane and budget per page.
harness/model_policy.py · harness/page_charter.py · harness/charters/feed.yml
Agent memory and learned rules
Signed-in agents keep page memory across sessions; repeated human feedback is distilled into explicit learnings an agent reads before it answers.
Learnings carry the evidence count and agreement behind each rule.
services/learning_service.py · harness/chat.py
Document understanding
CSV, Excel, Word and PDF files are read into a structured form agents can query, on the web process or a worker.
Covered by the document service tests.
services/doc_service.py · api/doc_router.py