# dataforgoodfr/13_ia_financement architecture

> Architecture diagram of the GitHub repository dataforgoodfr/13_ia_financement, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dataforgoodfr/13_ia_financement
- Repository: https://github.com/dataforgoodfr/13_ia_financement

## Overview

This repository contains a Streamlit assistant that helps associations pre-fill funding applications from project and organization documents. The main workflow is documented as uploading source material and a blank application, retrieving relevant context with vector or graph RAG, and viewing or downloading a completed form. The README also describes V2 question extraction, table/diagram extraction, and RAG-selection work, but says these were not integrated. The V1 wiring is supported by the README and sampled imports; unsampled V2 implementation links are left unverified.

Main entry points: [`streamlit_users/rag_pipelines.py`](https://github.com/dataforgoodfr/13_ia_financement/blob/main/streamlit_users/rag_pipelines.py) (Document ingestion), [`streamlit_users/app.py`](https://github.com/dataforgoodfr/13_ia_financement/blob/main/streamlit_users/app.py) (Streamlit interface), [`streamlit_users/PathRAG/PathRAG.py`](https://github.com/dataforgoodfr/13_ia_financement/blob/main/streamlit_users/PathRAG/PathRAG.py) (PathRAG engine), [`streamlit_users/read_answer_aap.py`](https://github.com/dataforgoodfr/13_ia_financement/blob/main/streamlit_users/read_answer_aap.py) (Form extraction and filling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_streamlit["Streamlit interface<br/>[app.py]"]
  node_intro["Introduction page<br/>[page1_intro.py]"]
  node_ingestion["Document ingestion<br/>[rag_pipelines.py]"]
  node_question_answering["Question answering<br/>[rag_pipelines.py]"]
  node_form_filling["Form extraction and filling<br/>[read_answer_aap.py]"]
end

subgraph group_retrieval["Retrieval"]
  node_hybrid["Hybrid retrieval"]
  node_graph_retriever["Graph retrieval"]
end

subgraph group_pathrag["Graph RAG"]
  node_pathrag_engine["PathRAG engine<br/>[PathRAG.py]"]
  node_pathrag_ops["Graph operations<br/>[operate.py]"]
  node_pathrag_storage[("Graph and vector storage<br/>[storage.py]")]
  node_pathrag_llm["LLM adapters<br/>[llm.py]"]
end

subgraph group_planned["Planned V2"]
  node_visual_question_extractor["Visual question extraction"]
  node_table_diagram_extractor["Table and diagram extraction"]
  node_question_classifier["Question classifiers"]
end

node_association(("Association user"))
node_source_docs["Source documents"]
node_blank_form["Blank application"]
node_completed_form["Completed application"]

node_association -->|"uses"| node_streamlit
node_association -->|"uploads"| node_source_docs
node_association -->|"uploads"| node_blank_form
node_streamlit -->|"routes to"| node_intro
node_streamlit -->|"processes documents"| node_ingestion
node_streamlit -->|"requests answers"| node_question_answering
node_streamlit -->|"uses"| node_form_filling
node_source_docs -->|"provides content"| node_ingestion
node_blank_form -->|"provides template"| node_form_filling
node_ingestion -->|"builds retrieval"| node_hybrid
node_ingestion -->|"builds retrieval"| node_graph_retriever
node_question_answering -.->|"queries"| node_hybrid
node_question_answering -.->|"queries"| node_graph_retriever
node_graph_retriever -->|"creates and queries"| node_pathrag_engine
node_pathrag_engine -->|"delegates to"| node_pathrag_ops
node_pathrag_engine -->|"uses"| node_pathrag_storage
node_pathrag_engine -->|"uses"| node_pathrag_llm
node_form_filling -->|"produces"| node_completed_form
node_association -->|"downloads"| node_completed_form
node_visual_question_extractor -.->|"planned integration"| node_ingestion
node_table_diagram_extractor -.->|"planned integration"| node_ingestion
node_question_classifier -.->|"planned routing"| node_question_answering

click node_streamlit "https://github.com/dataforgoodfr/13_ia_financement/blob/main/streamlit_users/app.py"
click node_intro "https://github.com/dataforgoodfr/13_ia_financement/blob/main/streamlit_users/page1_intro.py"
click node_ingestion "https://github.com/dataforgoodfr/13_ia_financement/blob/main/streamlit_users/rag_pipelines.py"
click node_question_answering "https://github.com/dataforgoodfr/13_ia_financement/blob/main/streamlit_users/rag_pipelines.py"
click node_form_filling "https://github.com/dataforgoodfr/13_ia_financement/blob/main/streamlit_users/read_answer_aap.py"
click node_hybrid "https://github.com/dataforgoodfr/13_ia_financement/blob/main/streamlit_users/hybrid_retriever.py"
click node_graph_retriever "https://github.com/dataforgoodfr/13_ia_financement/blob/main/streamlit_users/graphrag_retriever.py"
click node_pathrag_engine "https://github.com/dataforgoodfr/13_ia_financement/blob/main/streamlit_users/PathRAG/PathRAG.py"
click node_pathrag_ops "https://github.com/dataforgoodfr/13_ia_financement/blob/main/streamlit_users/PathRAG/operate.py"
click node_pathrag_storage "https://github.com/dataforgoodfr/13_ia_financement/blob/main/streamlit_users/PathRAG/storage.py"
click node_pathrag_llm "https://github.com/dataforgoodfr/13_ia_financement/blob/main/streamlit_users/PathRAG/llm.py"
click node_visual_question_extractor "https://github.com/dataforgoodfr/13_ia_financement/tree/main/notebooks"
click node_table_diagram_extractor "https://github.com/dataforgoodfr/13_ia_financement/tree/main/notebooks"
click node_question_classifier "https://github.com/dataforgoodfr/13_ia_financement/blob/main/notebooks/questions_classifier.ipynb"

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,node_intro,node_ingestion,node_question_answering,node_form_filling,node_association toneBlue
class node_hybrid,node_graph_retriever toneAmber
class node_pathrag_engine,node_pathrag_ops,node_pathrag_storage,node_pathrag_llm toneMint
class node_visual_question_extractor,node_table_diagram_extractor,node_question_classifier toneRose
class node_source_docs,node_blank_form,node_completed_form toneIndigo
```

## Components

### Application

- [Streamlit interface](https://github.com/dataforgoodfr/13_ia_financement/blob/main/streamlit_users/app.py): `streamlit_users/app.py`
- [Introduction page](https://github.com/dataforgoodfr/13_ia_financement/blob/main/streamlit_users/page1_intro.py): `streamlit_users/page1_intro.py`
- [Document ingestion](https://github.com/dataforgoodfr/13_ia_financement/blob/main/streamlit_users/rag_pipelines.py): `streamlit_users/rag_pipelines.py`
- [Question answering](https://github.com/dataforgoodfr/13_ia_financement/blob/main/streamlit_users/rag_pipelines.py): `streamlit_users/rag_pipelines.py`
- [Form extraction and filling](https://github.com/dataforgoodfr/13_ia_financement/blob/main/streamlit_users/read_answer_aap.py): `streamlit_users/read_answer_aap.py`

### Retrieval

- [Hybrid retrieval](https://github.com/dataforgoodfr/13_ia_financement/blob/main/streamlit_users/hybrid_retriever.py): `streamlit_users/hybrid_retriever.py`
- [Graph retrieval](https://github.com/dataforgoodfr/13_ia_financement/blob/main/streamlit_users/graphrag_retriever.py): `streamlit_users/graphrag_retriever.py`

### Graph RAG

- [PathRAG engine](https://github.com/dataforgoodfr/13_ia_financement/blob/main/streamlit_users/PathRAG/PathRAG.py): `streamlit_users/PathRAG/PathRAG.py`
- [Graph operations](https://github.com/dataforgoodfr/13_ia_financement/blob/main/streamlit_users/PathRAG/operate.py): `streamlit_users/PathRAG/operate.py`
- [Graph and vector storage](https://github.com/dataforgoodfr/13_ia_financement/blob/main/streamlit_users/PathRAG/storage.py): `streamlit_users/PathRAG/storage.py`
- [LLM adapters](https://github.com/dataforgoodfr/13_ia_financement/blob/main/streamlit_users/PathRAG/llm.py): `streamlit_users/PathRAG/llm.py`

### Planned V2

- [Visual question extraction](https://github.com/dataforgoodfr/13_ia_financement/tree/main/notebooks): `notebooks`
- [Table and diagram extraction](https://github.com/dataforgoodfr/13_ia_financement/tree/main/notebooks): `notebooks`
- [Question classifiers](https://github.com/dataforgoodfr/13_ia_financement/blob/main/notebooks/questions_classifier.ipynb): `notebooks/questions_classifier.ipynb`

### Other components

- **Association user**
- **Source documents**
- **Blank application**
- **Completed application**

## Connections

- Association user → Streamlit interface: uses (evidence: `README.md`)
- Association user → Source documents: uploads (evidence: `README.md`)
- Association user → Blank application: uploads (evidence: `README.md`)
- Streamlit interface → Introduction page: routes to (evidence: `streamlit_users/app.py`)
- Streamlit interface → Document ingestion: processes documents (evidence: `streamlit_users/app.py`)
- Streamlit interface → Question answering: requests answers (evidence: `streamlit_users/app.py`)
- Streamlit interface → Form extraction and filling: uses (evidence: `streamlit_users/app.py`)
- Source documents → Document ingestion: provides content (evidence: `README.md`)
- Blank application → Form extraction and filling: provides template (evidence: `README.md`)
- Document ingestion → Hybrid retrieval: builds retrieval (evidence: `streamlit_users/rag_pipelines.py`)
- Document ingestion → Graph retrieval: builds retrieval (evidence: `streamlit_users/rag_pipelines.py`)
- Question answering → Hybrid retrieval: queries (evidence: `streamlit_users/rag_pipelines.py`)
- Question answering → Graph retrieval: queries (evidence: `streamlit_users/rag_pipelines.py`)
- Graph retrieval → PathRAG engine: creates and queries (evidence: `streamlit_users/graphrag_retriever.py`)
- PathRAG engine → Graph operations: delegates to (evidence: `streamlit_users/PathRAG/PathRAG.py`)
- PathRAG engine → Graph and vector storage: uses (evidence: `streamlit_users/PathRAG/PathRAG.py`)
- PathRAG engine → LLM adapters: uses (evidence: `streamlit_users/PathRAG/PathRAG.py`)
- Form extraction and filling → Completed application: produces (evidence: `README.md`)
- Association user → Completed application: downloads (evidence: `README.md`)
- Visual question extraction → Document ingestion: planned integration (evidence: `notebooks/streamlit_MM/app.py`)
- Table and diagram extraction → Document ingestion: planned integration (evidence: `notebooks/streamlit_MM/app.py`)
- Question classifiers → Question answering: planned routing
