pragunbhutani / dbt-llm-tools

RAG based LLM chatbot for dbt projects
Other
68 stars 15 forks source link

Replace hardcoded limit of number of models in embeddings query. #37

Open SohamKukreti opened 4 months ago

SohamKukreti commented 4 months ago

in /dbt_llm_tools/vector_store.py n_results has a default value set to 3.

def query_collection(
        self, query: str, n_results: int = 3
    ) -> list[ParsedSearchResult]:

also in /client/pages/chat.py n_results is hardcoded to 4.

def get_matching_models(query):
    return vector_store.query_collection(query=query, n_results=4)

Ideally we should have the vector store return all the models where the cosine distance is above a certain threshold value.