Open evvfebruary opened 8 months ago
@trollknurr It would be nice if you check top-level structure of this PR before I start implement things, just to be sure that I am understood and accepted our modern architecture correctly πΆβπ«οΈ
@evvfebruary I'm not evangelist of hex arch - get known about it last week, and now trying it in prod, BUT
According to https://herbertograca.com/2017/11/16/explicit-architecture-01-ddd-hexagonal-onion-clean-cqrs-how-i-put-it-all-together/:
1) Input ports is only for outside interactions with our app, so there we need only output port that will handle vector db 2) Service is needed only for handling some flow of bussiness logic - like ingest text doc (ingest text input port + service for handling this shit)
So in my opinion you have to design an output port for vector storage & maybe add some first adapter
I'm not evangelist of hex arch - get known about it last week, and now trying it in prod, BUT
So, I think we can investigate it together if we both kinda newbies in this.
- Input ports is only for outside interactions with our app, so there we need only output port that will handle vector db
Sounds logical and we definetely don't have cases for that type of interactions ( at least for now ).
- Service is needed only for handling some flow of bussiness logic - like ingest text doc (ingest text input port + service for handling this shit)
Got the main idea and began to feel that we were overengineering from the first lines of code (which I like so far, to be honest)
I think we all understand that if got something working - it wasn't main our main goal π―
Based on QA with RAG user story we definetely want to put bunch of embeddings somewhere π§Ί
LangChain already have interfaces for vast amount of vector stores π
Documentation Source code Hexagonal architecture allows us not to think about a specific tool yet (be it OpenSearch / Clickhouse / ChromaDb / etc ).
I will wrap up the implementation of ports for interacting with vector storage firstly, and than we can choose solution according of our restrictions and inner wishes.