Skip to content

Commit cb308b7

Browse files
edurdevicepec254
andauthored
Updated default embeddings (#58)
* Update 03_agent_proof_of_concept.py Changed vector search defaults * Update 03_agent_proof_of_concept.py Added comment * Update 02_data_pipeline.py Changed default embeddings * Update 03_agent_proof_of_concept.py change back to ann by default --------- Co-authored-by: Eric Peter <epeter@gmail.com>
1 parent ec0c73b commit cb308b7

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

agent_app_sample_code/02_data_pipeline.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,7 @@
9797

9898
# Embedding model endpoint. The list of off-the-shelf embeddings can be found here:
9999
# https://docs.databricks.com/en/machine-learning/foundation-models/index.html
100-
EMBEDDING_MODEL_ENDPOINT = "databricks-bge-large-en"
101-
# EMBEDDING_MODEL_ENDPOINT = "ep-embeddings-small"
102-
# EMBEDDING_MODEL_ENDPOINT = "bge-test"
100+
EMBEDDING_MODEL_ENDPOINT = "databricks-gte-large-en"
103101

104102
# COMMAND ----------
105103

agent_app_sample_code/03_agent_proof_of_concept.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
additional_metadata_columns=[],
4646
),
4747
parameters=RetrieverParametersConfig(num_results=5, query_type="ann"),
48-
vector_search_threshold=0.1,
48+
vector_search_threshold=0.0, # Increase this to make the search more restrictive
4949
chunk_template="Passage text: {chunk_text}\nPassage metadata: {metadata}\n\n",
5050
prompt_template="""Use the following pieces of retrieved context to answer the question.\nOnly use the passages from context that are relevant to the query to answer the question, ignore the irrelevant passages. When responding, cite your source, referring to the passage by the columns in the passage's metadata.\n\nContext: {context}""",
5151
tool_description_prompt="Search for documents that are relevant to a user's query about the [REPLACE WITH DESCRIPTION OF YOUR DOCS].",

0 commit comments

Comments
 (0)