PEIS: Personal Evidence Intelligence System

Generative AI & AgentsOngoing2026RetrievalGenerative AI

An evidence-first AI agent system that investigates questions and claims against a personal knowledge base and answers with verified source references.

The challenge

Language models tend to answer confidently even when the grounds are missing. For questions whose answers must be documented (what can actually be supported by one’s own documents, reports and notes?), you need a system where evidence comes before generation, and where a missing hit is not read as proof that something does not exist.

The solution

PEIS ingests source documents, splits them into traceable segments and lets a bounded AI agent investigate a question in several steps with a set of local tools. The agent must cite segments it has actually retrieved, and the answer states how well the claim is supported and where evidence is missing.

How it was built

A typed Python codebase with source ingestion (stable IDs, versioning and checksums), deterministic parsing of Markdown, DOCX, TXT and PDF, SQLite storage and BM25 search with evidence-aware reranking. Six typed tools (search, evidence retrieval, source and claim inspection, comparison and gap detection) are used through the model’s native tool calling, inside an agent loop with a tool budget, loop guard, permission control and citation verification. The model interface is not tied to a single provider, and PEIS owns the investigation state, so only decision-relevant context is sent to the model at each step.

Result

PEIS works end to end today: it runs bounded multi-step investigations with tool calls and verified source references. The project is under active development.

Technologies and methods

PythonPydanticSQLAlchemy/SQLiteBM25 (rank-bm25)PyMuPDFpython-docxLLM tool calling (OpenAI-compatible API)Agent loop with budget and permission controlpytestRuffmypy