Skip to content

Commit

Permalink
increase topk to 15
Browse files Browse the repository at this point in the history
  • Loading branch information
omar-sol committed Jul 30, 2024
1 parent 8ce4dd7 commit 8798577
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion scripts/main.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import pdb

import gradio as gr
import logfire
from llama_index.agent.openai import OpenAIAgent
Expand Down Expand Up @@ -148,7 +150,6 @@ def format_sources(completion) -> str:
"📝 Here are the sources I used to answer your question:\n{documents}"
)
document_template: str = "[🔗 {source}: {title}]({url}), relevance: {score:2.2f}"

all_documents = []
for source in completion.sources:
for src in source.raw_output:
Expand Down
2 changes: 1 addition & 1 deletion scripts/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def setup_database(db_collection, dict_file_name):
)
vector_retriever = VectorIndexRetriever(
index=index,
similarity_top_k=10,
similarity_top_k=15,
use_async=True,
embed_model=OpenAIEmbedding(model="text-embedding-3-large", mode="similarity"),
)
Expand Down

0 comments on commit 8798577

Please sign in to comment.