Skip to content

v1.6.2 — Batch Retrieval, Policy Expansion Toggle, RAG Evaluation

Choose a tag to compare

@Lotargo Lotargo released this 12 Aug 02:39
· 129 commits to main since this release

What's New

Batch Retrieval API

Execute multiple search queries in a single MCP call — all query embeddings computed in one ONNX pass, queries run in parallel. Ideal for cross-document comparisons and multi-part analysis.

  • New MCP tool: batch_query_knowledge_base
  • ~N× faster than N separate query_knowledge_base calls (shared ONNX inference)
  • Returns one result set per query, in input order

Policy Expansion Toggle

Table summaries and code signatures are now automatically expanded to full content for better recall. Can be disabled when pure micro_chunk precision is needed.

  • New config: policyExpansion (default: true)
  • Trade-off: ~+5-10% recall, slight MRR decrease
  • Per-call override: hybridQuery({ policyExpansion: false })

RAG Evaluation Test

Automated quality verification with 10 analytical queries against financial reports. Validates that retrieved chunks contain expected facts.

  • 84/84 facts found (100% pass rate)
  • Includes raw-question vs optimized-query comparison (+33% fact retrieval improvement)
  • Run: npm run test:rag

Documentation & Agent Instructions

  • Updated PROMPT_BLOCK with query optimization and batch usage directives
  • SKILL.md updated with batch query tool and query formulation guidance
  • README updated with new tool and config option

Files Changed

  • mcp-server/retrieval/retriever.js — batchHybridQuery() + _precomputedVector parameter
  • mcp-server/tools/rag_tools.js — batch_query_knowledge_base MCP tool
  • mcp-server/config/config_manager.js — policyExpansion config option
  • mcp-server/prompt_manager.js — updated agent instructions
  • skills/using-memory/SKILL.md — batch query documentation
  • tests/unit/rag_evaluation.test.js — new evaluation test
  • CHANGELOG.md, README.md