LangGraph orchestration · Remote MCP tools · ChromaDB retrieval · OpenAI Structured Outputs · Streamlit
Developed by Mayukh Das · TU Braunschweig · mayukh@ifis.cs.tu-bs.de
Dialectica AI turns a research question into a traceable evidence analysis. It retrieves curated evidence notes derived from peer-reviewed, open-access AI papers, extracts claims, verifies citations, searches for counterevidence, and produces a qualified conclusion.
The repository does not present the curator-written notes as quotations from the papers. Every evidence card identifies the note as a summary and links to the original paper for the authors’ wording and full context.
flowchart LR
U[Research question] --> P[Planner]
P --> R[Researcher]
R -->|MCP semantic_search| M[(Remote MCP server)]
M --> C[(ChromaDB)]
R --> E[Evidence extractor]
E --> V[Verifier]
V --> K[Critic]
K -->|Coverage insufficient| Q[Refine query]
Q --> R
K -->|Coverage sufficient| S[Synthesizer]
S --> G[Evidence map and report]
| Layer | What it demonstrates |
|---|---|
| Streamlit | Usable public research workspace rather than a terminal-only demo |
| LangGraph | Typed state, node-level execution, conditional routing, bounded cycles |
| MCP | A genuine Streamable HTTP capability boundary with tools, a resource, and a prompt |
| ChromaDB | Corpus-specific semantic retrieval and source metadata preservation |
| OpenAI API | Pydantic-validated planning, extraction, verification, criticism, and synthesis |
| Verification | Exact note matching, claim-support checks, rejection of unsupported evidence |
| Deployment | Separate Streamlit and MCP services, bearer authentication, secrets, Docker, CI |
Four papers and twelve curated evidence notes:
- Faithful Chain-of-Thought Reasoning
- Making Reasoning Matter: Measuring and Improving Faithfulness of Chain-of-Thought Reasoning
- Measuring Chain of Thought Faithfulness by Unlearning Reasoning Steps
- Towards Better Chain-of-Thought: A Reflection on Effectiveness and Faithfulness
Example questions include:
- Does chain-of-thought prompting provide faithful explanations?
- Can chain-of-thought improve accuracy without improving faithfulness?
- What methods can measure chain-of-thought faithfulness?
Four papers and twelve curated evidence notes:
- RAGTruth: A Hallucination Corpus for Developing Trustworthy Retrieval-Augmented Language Models
- Reducing Hallucination in Structured Outputs via Retrieval-Augmented Generation
- Groundedness in Retrieval-Augmented Long-Form Generation: An Empirical Study
- Removal of Hallucination on Hallucination: Debate-Augmented RAG
Example questions include:
- Does retrieval-augmented generation eliminate hallucination?
- Can poor retrieval introduce new hallucinations in RAG systems?
- What evidence shows that correct RAG answers can still contain ungrounded sentences?
All included papers are hosted in the ACL Anthology and attributed with title, authors, venue, page range, DOI, source URL, and licence. See DATA_SOURCES.md.
Choose a corpus
↓
Select or write a research question
↓
Run Standard or Deep Review
↓
Read the evidence-balanced conclusion
↓
Inspect sources, evidence map, LangGraph path, and MCP calls
The public interface contains:
- Overview — verdict, confidence, evidence balance, qualification, limitations
- Evidence — supporting, opposing, uncertain, and rejected evidence
- Evidence Map — question → claims → evidence → papers
- LangGraph Workflow — real node path, iterations, durations, routing decisions
- Run Quality — citation validity, acceptance rate, tool success, counterevidence
- MCP Tools — discovered schemas and current-run tool log
flowchart TB
B[Recruiter browser] --> ST[Streamlit Community Cloud]
subgraph Streamlit service
UI[White-and-blue UI]
LG[LangGraph orchestrator]
OA[OpenAI Responses API]
UI --> LG
LG --> OA
end
ST --> UI
LG -->|Bearer-authenticated Streamable HTTP| MCP[FastMCP service on Render]
subgraph MCP service
MCP --> TOOLS[7 MCP tools]
TOOLS --> CH[(ChromaDB)]
TOOLS --> JS[(Run-scoped JSON evidence maps)]
end
server_health
list_corpora
semantic_search
fetch_passages
save_evidence_map
query_evidence_graph
export_run
evidence-schema://current # MCP resource
analyze_evidence_question # MCP prompt
The complete, copy-paste setup is in START_HERE.md.
py -3.12 -m venv .venv
Set-ExecutionPolicy -Scope Process Bypass
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install -r requirements-dev.txt
Copy-Item .env.example .env
python run_local.pyrun_local.py starts the authenticated MCP server, verifies the MCP handshake and tools, indexes both corpora, executes a LangGraph smoke test, and opens Streamlit only after the checks pass.
The deterministic mode works without API usage. To enable live reasoning, place a project-specific key in .env locally or in Streamlit Secrets online:
OPENAI_API_KEY=your-project-specific-key
DIALECTICA_DEMO_LLM=false
OPENAI_MODEL=gpt-5.6-luna
OPENAI_MODEL_DEEP=gpt-5.6-terraVisitors never see or enter the key. It remains in the server-side deployment environment.
The public architecture uses two deployments:
- Render: the Dockerized remote MCP server
- Streamlit Community Cloud: the frontend, LangGraph workflow, and OpenAI calls
Follow the complete instructions in START_HERE.md or DEPLOYMENT.md.
.
├── app.py # Streamlit frontend
├── run_local.py # one-command local launcher
├── dialectica/
│ ├── demo_data.py # two open-access paper corpora
│ ├── ingestion.py # metadata-preserving corpus ingestion
│ ├── vector_store.py # ChromaDB indexing and retrieval
│ ├── mcp_server.py # FastMCP tools, resource, prompt, auth
│ ├── mcp_client.py # Streamable HTTP MCP client
│ ├── workflow.py # LangGraph state and routing
│ ├── llm.py # OpenAI + deterministic reasoners
│ ├── schemas.py # Pydantic contracts
│ └── ui.py # themed components and evidence graph
├── tests/ # ingestion, reasoner, contract, workflow tests
├── render.yaml # Render Blueprint
├── Dockerfile.mcp # MCP service image
├── requirements.txt # Streamlit service
├── requirements-mcp.txt # MCP service
├── START_HERE.md # complete local and cloud instructions
└── DATA_SOURCES.md # paper attribution and curation policy
- No public paper uploads in this release.
- No arbitrary URL retrieval or live web search.
- No destructive indexing tools on the public MCP surface.
- The MCP endpoint requires a server-to-server bearer token.
- OpenAI and MCP credentials are excluded from Git.
- Browser-session limits reduce accidental usage but are not a hard security boundary.
- This is a portfolio research demo, not a systematic-review or clinical decision system.
See SECURITY.md.
python -m compileall -q app.py run_local.py dialectica tests
pytest -qGitHub Actions runs the same checks on pushes and pull requests.
Developed by Mayukh Das · TU Braunschweig · mayukh@ifis.cs.tu-bs.de