Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔎 Dialectica AI

Multi-Agent Evidence Reasoning over Open-Access AI Research

LangGraph orchestration · Remote MCP tools · ChromaDB retrieval · OpenAI Structured Outputs · Streamlit

Developed by Mayukh Das · TU Braunschweig · mayukh@ifis.cs.tu-bs.de


What the application does

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]
Loading

Recruiter-facing engineering signal

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

Prepared open-access evidence corpora

1. Chain-of-Thought Effectiveness and Faithfulness

Four papers and twelve curated evidence notes:

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?

2. RAG, Grounding and Hallucination

Four papers and twelve curated evidence notes:

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.


User experience

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

Architecture

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
Loading

MCP surface

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

Run locally

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.py

run_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.


Live OpenAI mode

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-terra

Visitors never see or enter the key. It remains in the server-side deployment environment.


Deploy online

The public architecture uses two deployments:

  1. Render: the Dockerized remote MCP server
  2. Streamlit Community Cloud: the frontend, LangGraph workflow, and OpenAI calls

Follow the complete instructions in START_HERE.md or DEPLOYMENT.md.


Repository map

.
├── 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

Safety and scope

  • 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.


Test suite

python -m compileall -q app.py run_local.py dialectica tests
pytest -q

GitHub Actions runs the same checks on pushes and pull requests.


Author

Developed by Mayukh Das · TU Braunschweig · mayukh@ifis.cs.tu-bs.de

About

No description, website, or topics provided.

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages