Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,16 @@ VITE_API_BASE_URL=https://<your-backend>.onrender.com/api

The included `render.yaml` defines a backend web service and a frontend static site for the same repo.

### RAG Retrieval & Source Ranking Configuration

During document Q&A queries, LocalMind ranks retrieved text segments to provide accurate citations and relevant context:

1. **Selection & Ranking**: Matching reference segments are selected using **Cosine Similarity** (`"hnsw:space": "cosine"` configured in ChromaDB). Chunks are ranked by similarity score, placing the most relevant fragments at the top of the LLM context.
2. **Citations**: The ranked segments are processed into a structured list of unique document sources and text previews, which are rendered as inline citation links in the UI.
3. **Production Configuration**: The retrieval process is influenced by the following settings in the `app_settings` SQLite database table (adjustable via the Settings Panel in the UI):
- **`rag_top_k`** (Default: `4`, Range: `1-10`): Controls the number of top-ranked retrieved source chunks injected into the context window.
- **`rag_chunk_overlap`** (Default: `50`, Range: `0-200` characters): Sets the character overlap bounds between adjacent document chunks to maintain continuous context links during document ingestion.

## macOS Install Troubleshooting

### `node` or `npm` not found
Expand Down
1 change: 1 addition & 0 deletions backend/models/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ class ExportFormat(str, Enum):
markdown = "markdown"
json = "json"
txt = "txt"
pdf = "pdf"


class SessionRenameItem(BaseModel):
Expand Down
1 change: 1 addition & 0 deletions backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ jsonschema>=4.17.0
psutil
grapheme==0.6.0
pre-commit==4.6.0
fpdf2==2.8.7
1 change: 1 addition & 0 deletions backend/requirements_fixed.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ python-dotenv==1.0.1
httpx==0.27.0
pytest==8.3.0
pytest-asyncio==0.24.0
fpdf2==2.8.7
Loading