# emarco177/documentation-helper architecture

> Architecture diagram of the GitHub repository emarco177/documentation-helper, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/emarco177/documentation-helper
- Repository: https://github.com/emarco177/documentation-helper

## Overview

The app accepts documentation questions in Streamlit, retrieves matching content through a tool-backed RAG agent, and displays answers with source citations. A separate ingestion script crawls LangChain documentation, chunks it, and indexes it. The sampled ingestion code writes to local Chroma, while query-time code uses Pinecone; the relationship between these stores is not shown. Although the README describes conversational memory and broader Tavily capabilities, sampled runtime code does not establish their implementation, so they are omitted.

Main entry points: [`backend/core.py`](https://github.com/emarco177/documentation-helper/blob/main/backend/core.py) (Answer agent), [`ingestion.py`](https://github.com/emarco177/documentation-helper/blob/main/ingestion.py) (Ingestion orchestrator), [`main.py`](https://github.com/emarco177/documentation-helper/blob/main/main.py) (Streamlit UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Chat interface"]
  node_streamlit["Streamlit UI<br/>[main.py]"]
end

subgraph group_answering["RAG answering"]
  node_rag["Answer agent<br/>[core.py]"]
  node_retrieval["Context retrieval<br/>[core.py]"]
  node_pinecone[("Pinecone index")]
end

subgraph group_ingestion["Documentation ingestion"]
  node_ingest["Ingestion orchestrator<br/>[ingestion.py]"]
  node_chunker["Document chunker<br/>[ingestion.py]"]
  node_indexer["Batch indexer<br/>[ingestion.py]"]
  node_chroma[("Local Chroma")]
end

node_user(("Questioner"))
node_openai{{"OpenAI models"}}
node_tavily{{"Tavily crawl"}}

node_user -->|"asks"| node_streamlit
node_streamlit -->|"calls"| node_rag
node_rag -->|"dispatches"| node_retrieval
node_retrieval -->|"searches"| node_pinecone
node_pinecone -->|"returns documents"| node_retrieval
node_retrieval -->|"returns context"| node_rag
node_rag -->|"generates with"| node_openai
node_rag -->|"returns answer and context"| node_streamlit
node_ingest -->|"crawls"| node_tavily
node_ingest -->|"splits documents"| node_chunker
node_ingest -->|"indexes chunks"| node_indexer
node_indexer -->|"writes embeddings"| node_chroma
node_indexer -->|"embeds with"| node_openai

click node_streamlit "https://github.com/emarco177/documentation-helper/blob/main/main.py"
click node_rag "https://github.com/emarco177/documentation-helper/blob/main/backend/core.py"
click node_retrieval "https://github.com/emarco177/documentation-helper/blob/main/backend/core.py"
click node_ingest "https://github.com/emarco177/documentation-helper/blob/main/ingestion.py"
click node_chunker "https://github.com/emarco177/documentation-helper/blob/main/ingestion.py"
click node_indexer "https://github.com/emarco177/documentation-helper/blob/main/ingestion.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_streamlit toneBlue
class node_rag,node_retrieval,node_pinecone toneAmber
class node_ingest,node_chunker,node_indexer,node_chroma toneMint
class node_user,node_openai,node_tavily toneIndigo
```

## Components

### Chat interface

- [Streamlit UI](https://github.com/emarco177/documentation-helper/blob/main/main.py): `main.py`

### RAG answering

- [Answer agent](https://github.com/emarco177/documentation-helper/blob/main/backend/core.py): `backend/core.py`
- [Context retrieval](https://github.com/emarco177/documentation-helper/blob/main/backend/core.py): `backend/core.py`
- **Pinecone index**

### Documentation ingestion

- [Ingestion orchestrator](https://github.com/emarco177/documentation-helper/blob/main/ingestion.py): `ingestion.py`
- [Document chunker](https://github.com/emarco177/documentation-helper/blob/main/ingestion.py): `ingestion.py`
- [Batch indexer](https://github.com/emarco177/documentation-helper/blob/main/ingestion.py): `ingestion.py`
- **Local Chroma**

### Other components

- **Questioner**
- **OpenAI models**
- **Tavily crawl**

## Connections

- Questioner → Streamlit UI: asks
- Streamlit UI → Answer agent: calls
- Answer agent → Context retrieval: dispatches
- Context retrieval → Pinecone index: searches
- Pinecone index → Context retrieval: returns documents
- Context retrieval → Answer agent: returns context
- Answer agent → OpenAI models: generates with
- Answer agent → Streamlit UI: returns answer and context
- Ingestion orchestrator → Tavily crawl: crawls
- Ingestion orchestrator → Document chunker: splits documents
- Ingestion orchestrator → Batch indexer: indexes chunks
- Batch indexer → Local Chroma: writes embeddings
- Batch indexer → OpenAI models: embeds with
