danny-avila / rag_api

ID-based RAG FastAPI: Integration with Langchain and PostgreSQL/pgvector
https://librechat.ai/
MIT License
252 stars 105 forks source link

Create a vector search index for Atlas MongoDB initially #32

Closed waldemarschmalz closed 4 months ago

waldemarschmalz commented 4 months ago

Would it feasible to generate the vector search index upon startup? This approach may simplify deployments, as the API could establish a connection with MongoDB and instantiate the index.

Have I overlooked something or is there a specific reason this wouldn't be advisable?

danny-avila commented 4 months ago

Should be possible, I’ve been researching what might be the best way.

danny-avila commented 4 months ago

Just tried this, wasn't straightforward; also learned in the process that an M10+ cluster ($0.08/hr minimum) is required to create it programmatically.

Hopefully they change this in the future, especially when mongodb rolls vector search out for local installations

https://feedback.mongodb.com/forums/924868-atlas-search/suggestions/38761267-be-able-to-create-search-indexes-from-mongo-shell