Skip to content

feat(rag): add chunking tuning settings and deployment docs (#922) - #1049

Merged
imDarshanGK merged 2 commits into
imDarshanGK:mainfrom
AkhileshPachnanda:feat/chunking-tuning-docs-922
Jul 31, 2026
Merged

feat(rag): add chunking tuning settings and deployment docs (#922)#1049
imDarshanGK merged 2 commits into
imDarshanGK:mainfrom
AkhileshPachnanda:feat/chunking-tuning-docs-922

Conversation

@AkhileshPachnanda

Copy link
Copy Markdown
Contributor

Description

Closes #922

This PR introduces configurable RAG document chunk size (rag_chunk_size), allowing users to tune chunking parameters via settings to optimize retrieval quality for different document profiles. It also adds detailed build & deployment documentation on chunking recommendations.

Changes Made

  • Backend:
    • Added rag_chunk_size: int = 600 field to AppSettings schema (backend/models/schemas.py).
    • Implemented boundary validation (100–2000 characters) in settings route (backend/routes/settings.py).
    • Updated index_document() in backend/services/rag_service.py to read rag_chunk_size dynamically from settings with fallback to default (600).
  • Frontend:
    • Added "RAG Chunk Size" range slider control (100–2000 step 50) to SettingsPanel.jsx.
  • Documentation:
    • Added deployment and chunking tuning guide in docs/deployment.md.
  • Tests:
    • Updated backend tests (test_api.py) for rag_chunk_size validation & persistence.
    • Updated frontend test mocks in SettingsPanel.test.jsx.

Type of Change

  • Feature (non-breaking change which adds functionality)
  • Docs (documentation updates)
  • Tests (adding or updating tests)

Checklist

  • My code follows the project's coding standards.
  • All backend unit tests pass (pytest tests/ -v).
  • I have updated documentation accordingly.
  • My changes generate no new warnings or errors.

How to Verify

Automated Verification

  1. Backend Tests:
    cd backend
    pytest tests/test_api.py -v

@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

@AkhileshPachnanda is attempting to deploy a commit to the Darshan's projects Team on Vercel.

A member of the Team first needs to authorize it.

@imDarshanGK imDarshanGK added SSoC26 Part of Social Summer of Code 2026 Medium Feature or backend work with moderate scope labels Jul 31, 2026
@imDarshanGK
imDarshanGK merged commit 28fc459 into imDarshanGK:main Jul 31, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Medium Feature or backend work with moderate scope SSoC26 Part of Social Summer of Code 2026

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add chunking tuning to build and deploy docs

2 participants