7beshoyarnest commited on
Commit
58f8537
·
verified ·
1 Parent(s): b7e2a59

Update src/agent_graph/tool_stories_rag.py

Browse files
src/agent_graph/tool_stories_rag.py CHANGED
@@ -10,12 +10,12 @@ class StoriesRAGTool:
10
  """
11
  A tool for retrieving relevant stories using a Retrieval-Augmented Generation (RAG) approach with vector embeddings.
12
 
13
- This tool leverages a pre-trained OpenAI embedding model to transform user queries into vector embeddings.
14
  It then uses these embeddings to query a Chroma-based vector database to retrieve the top-k most relevant
15
  stories from a specific collection stored in the database.
16
 
17
  Attributes:
18
- embedding_model (str): The name of the OpenAI embedding model used for generating vector representations of queries.
19
  vectordb_dir (str): The directory where the Chroma vector database is persisted on disk.
20
  k (int): The number of top-k nearest neighbor stories to retrieve from the vector database.
21
  vectordb (Chroma): The Chroma vector database instance connected to the specified collection and embedding model.
@@ -29,7 +29,7 @@ class StoriesRAGTool:
29
  Initializes the StoriesRAGTool with the necessary configurations.
30
 
31
  Args:
32
- embedding_model (str): The name of the embedding model (e.g., "text-embedding-ada-002")
33
  used to convert queries into vector representations.
34
  vectordb_dir (str): The directory path where the Chroma vector database is stored and persisted on disk.
35
  k (int): The number of nearest neighbor stories to retrieve based on query similarity.
 
10
  """
11
  A tool for retrieving relevant stories using a Retrieval-Augmented Generation (RAG) approach with vector embeddings.
12
 
13
+ This tool leverages a pre-trained Hugging Face embedding model to transform user queries into vector embeddings.
14
  It then uses these embeddings to query a Chroma-based vector database to retrieve the top-k most relevant
15
  stories from a specific collection stored in the database.
16
 
17
  Attributes:
18
+ embedding_model (str): The name of the Hugging Face embedding model used for generating vector representations of queries.
19
  vectordb_dir (str): The directory where the Chroma vector database is persisted on disk.
20
  k (int): The number of top-k nearest neighbor stories to retrieve from the vector database.
21
  vectordb (Chroma): The Chroma vector database instance connected to the specified collection and embedding model.
 
29
  Initializes the StoriesRAGTool with the necessary configurations.
30
 
31
  Args:
32
+ embedding_model (str): The name of the embedding model (e.g., "all-MiniLM-L6-v2")
33
  used to convert queries into vector representations.
34
  vectordb_dir (str): The directory path where the Chroma vector database is stored and persisted on disk.
35
  k (int): The number of nearest neighbor stories to retrieve based on query similarity.