trollknurr / hard-chill-response

3 stars 0 forks source link

feature: add very raw implementation of vector db support #9

Open evvfebruary opened 8 months ago

evvfebruary commented 8 months ago

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.

evvfebruary commented 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 πŸ˜Άβ€πŸŒ«οΈ

trollknurr commented 8 months ago

@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

evvfebruary commented 8 months ago

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.

  1. 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 ).

  1. 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)

trollknurr commented 8 months ago

I think we all understand that if got something working - it wasn't main our main goal 🎯