Skip to content

Commit

Permalink
Updated default embeddings (#58)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
edurdevic and epec254 authored Jan 24, 2025
1 parent ec0c73b commit cb308b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions agent_app_sample_code/02_data_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,7 @@

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

# COMMAND ----------

Expand Down
2 changes: 1 addition & 1 deletion agent_app_sample_code/03_agent_proof_of_concept.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
additional_metadata_columns=[],
),
parameters=RetrieverParametersConfig(num_results=5, query_type="ann"),
vector_search_threshold=0.1,
vector_search_threshold=0.0, # Increase this to make the search more restrictive
chunk_template="Passage text: {chunk_text}\nPassage metadata: {metadata}\n\n",
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}""",
tool_description_prompt="Search for documents that are relevant to a user's query about the [REPLACE WITH DESCRIPTION OF YOUR DOCS].",
Expand Down

0 comments on commit cb308b7

Please sign in to comment.