Skip to content

Commit 8798577

Browse files
committed
increase topk to 15
1 parent 8ce4dd7 commit 8798577

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

scripts/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import pdb
2+
13
import gradio as gr
24
import logfire
35
from llama_index.agent.openai import OpenAIAgent
@@ -148,7 +150,6 @@ def format_sources(completion) -> str:
148150
"📝 Here are the sources I used to answer your question:\n{documents}"
149151
)
150152
document_template: str = "[🔗 {source}: {title}]({url}), relevance: {score:2.2f}"
151-
152153
all_documents = []
153154
for source in completion.sources:
154155
for src in source.raw_output:

scripts/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def setup_database(db_collection, dict_file_name):
5151
)
5252
vector_retriever = VectorIndexRetriever(
5353
index=index,
54-
similarity_top_k=10,
54+
similarity_top_k=15,
5555
use_async=True,
5656
embed_model=OpenAIEmbedding(model="text-embedding-3-large", mode="similarity"),
5757
)

0 commit comments

Comments
 (0)