Skip to content

Implement session-based FAISS indexing and update server/frontend for session handling#107

Merged
FireFistisDead merged 2 commits into
FireFistisDead:masterfrom
DivyaSreenijaKasa:feature/session-based-faiss
May 22, 2026
Merged

Implement session-based FAISS indexing and update server/frontend for session handling#107
FireFistisDead merged 2 commits into
FireFistisDead:masterfrom
DivyaSreenijaKasa:feature/session-based-faiss

Conversation

@DivyaSreenijaKasa
Copy link
Copy Markdown
Contributor

@DivyaSreenijaKasa DivyaSreenijaKasa commented May 21, 2026

Summary

Implemented session-based FAISS indexing to isolate uploaded PDFs.
Each upload now generates a unique session_id and stores its FAISS index
in a dedicated folder. This prevents cross-document mixing and ensures
queries return results only from the correct session.

Related issue

Closes #56

Testing

  • Verified app starts successfully
  • Uploaded multiple PDFs and confirmed unique session IDs are generated
  • Queried each session independently and validated answers come only from the correct document
  • Frontend and server updated to pass session_id correctly

Screenshots / recordings

Swagger UI and local tests confirm correct isolation of sessions.

Notes

  • Updated backend (rag-service/main.py), server (server.js), and frontend (src/index.js)
  • Dependency files (package.json, package-lock.json) updated
  • rag-service/faiss_store/ contains runtime indexes and should remain ignored in version control

Future work

  • Add cleanup logic to remove expired or unused FAISS indexes to prevent disk bloat
  • Update README.md to document persistence behavior and usage instructions
  • Explore support for multi-document history or named sessions

@github-actions github-actions Bot added backend Express or API gateway work fix A targeted fix or cleanup frontend Frontend-related work rag-service FastAPI / model service work type:testing docs Documentation only documentation Improvements or additions to documentation feature A new feature or improvement labels May 21, 2026
@FireFistisDead
Copy link
Copy Markdown
Owner

@DivyaSreenijaKasa resolve the merge conflicts

@DivyaSreenijaKasa
Copy link
Copy Markdown
Contributor Author

DivyaSreenijaKasa commented May 22, 2026

@FireFistisDead Thanks for pointing that out. I’ll resolve the merge conflicts and update the PR shortly.

@DivyaSreenijaKasa
Copy link
Copy Markdown
Contributor Author

@FireFistisDead Conflicts have been resolved and the branch is up to date.
This PR is ready for review and merge.
If there are any further changes needed, please let me know.

@FireFistisDead FireFistisDead merged commit e92ea91 into FireFistisDead:master May 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Express or API gateway work docs Documentation only documentation Improvements or additions to documentation feature A new feature or improvement fix A targeted fix or cleanup frontend Frontend-related work gssoc:approved level:critical mentor:FireFistisDead quality:clean rag-service FastAPI / model service work type:bug Something isn't working type:docs type:security type:testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add Persistent Session Storage for FAISS Indexes

2 participants