Skip to content

refactor(rag): update rag params #765

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion server/agent/tools/knowledge.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ async def search_knowledge(
space_id_list=[bot_id, repo_name],
question=query,
embedding_model_name=EmbeddingModelEnum.OPENAI,
similarity_threshold=0.65,
similarity_threshold=0.6,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lowering the similarity threshold from 0.65 to 0.6 may increase the number of results returned, potentially including less relevant matches. Ensure this change aligns with the intended retrieval quality.

top=10,
metadata_filter={},
)
Expand Down
4 changes: 2 additions & 2 deletions server/rag/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ async def reload_repo(
repo_name=request.repo_name, auth_token=user.access_token
),
split_config=KnowledgeSplitConfig(
chunk_size=500,
chunk_overlap=100,
chunk_size=1000,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Increasing the chunk size and overlap may affect memory usage and processing time. Ensure that the system can handle these changes without performance degradation.

chunk_overlap=200,
),
)
]
Expand Down