App¶
This page documents the Streamlit test/prototype app. The production UI is now the React frontend backed by the backend API. Streamlit remains useful as a local test harness and fallback UI.
For the production UI runbook, see Frontend (React).
Entrypoint¶
| Bash | |
|---|---|
See also: LLM pipeline, Diagram, and Stage memory and follow-up chat.
App demo¶
See it live
Watch the demo: Watch the demo Request access: Contact form
App defaults (authoritative)¶
Defaults are loaded from DEFAULT_RETRIEVAL_SETTINGS in rag_core/config.py and are used whenever AUTO_PIPELINE_FROM_CHAT=1.
| Parameter | Default |
|---|---|
| dataset | fixed_size |
| date | 2025-09-14 |
| ingest_tag | comm_fixed_C1_g1_2 |
| level | C1 |
| seed_k | 120 |
| fetch_top_n | 120 |
| expand_ratio | 2.0 |
| expand_limit | 800 |
| rerank_mode | dense |
| prefer | summary |
| alpha | 0.7 |
| sort_by | final |
| diversify | mmr |
| mmr_lambda | 0.5 |
| max_per_doc | 2 |
| min_occurrence | 3 |
| top_k | 20 |
| graph_required | True |
| coverage | True |
| fusion | summary |
Reranker provider/model default (CLI layer): hf:BAAI/bge-reranker-base unless overridden via --rerank-spec.
AUTO_PIPELINE_FROM_CHAT behavior¶
AUTO_PIPELINE_FROM_CHAT is parsed as true when set to 1, true, yes, or on.
| Setting | Behavior |
|---|---|
| AUTO_PIPELINE_FROM_CHAT=1 | Retrieval settings are hidden/locked; defaults above are used; first Follow-ups Chat question triggers retrieval + synthesis; "Refresh pipeline" is shown; view is forced to Cards. Deployment uses this mode. |
| AUTO_PIPELINE_FROM_CHAT=0 | Retrieval widgets are visible/editable; "Run retrieval" controls the pipeline; user can override all retrieval parameters; view options are visible. |
Modes: local vs API¶
The app can run retrieval locally or call the API:
RAG_MODE=local(default): Streamlit invokes the CLI wrapper (rag.demo.triple_retriever_runner) which runspython -m rag.retrieval.triple_retriever rerank.RAG_MODE=api: Streamlit posts toRAG_API_URL(defaulthttp://api:8000) with optionalRAG_API_KEYand expects the same retrieval payload.
Overriding dataset/date/ingest_tag¶
You can override retrieval parameters in two ways:
1) UI (when AUTO_PIPELINE_FROM_CHAT=0): change the sidebar inputs for dataset/date/ingest_tag and rerun retrieval.
2) API (when RAG_MODE=api): pass parameters in the /query payload; the API merges them with defaults.
Inputs and outputs (summary)¶
- Inputs: GOLD data (chunks + indices), Neo4j for graph expansion, and LLM provider keys.
- Outputs: ranked chunk table, graph visualizations (Pyvis HTML), CSV/HTML exports (when enabled), and optional latency logs.
Neo4j and database notes¶
- VPS deployment uses Neo4j Community with a single DB:
graph-fixed-size. - Do not rely on multi-db or
graph-semanticfor production.