WeKnora/internal/application/service/chat_pipeline
wizardchen 092044b68f refactor(postgres): optimize vector retrieval and HNSW settings
- Adjusted the expanded TopK limit to a maximum of 200 candidates to enhance HNSW efficiency.
- Updated the vector retrieval query to ensure the ORDER BY expression matches the indexed expression, improving index usage.
- Implemented local settings for HNSW's ef_search and iterative_scan within a transaction to optimize candidate retrieval.
- Added fallback logic to handle unsupported GUCs gracefully, ensuring query execution continues even with older pgvector versions.

These changes improve the performance and reliability of vector retrieval in the PostgreSQL implementation.
2026-04-17 12:11:03 +08:00
..
chat_completion.go feat(prompts): update assistant descriptions and add intent-specific templates 2026-03-25 22:08:29 +08:00
chat_completion_stream.go feat(prompts): update assistant descriptions and add intent-specific templates 2026-03-25 22:08:29 +08:00
chat_pipeline.go feat(prompts): update assistant descriptions and add intent-specific templates 2026-03-25 22:08:29 +08:00
chat_pipeline_test.go feat(prompts): update assistant descriptions and add intent-specific templates 2026-03-25 22:08:29 +08:00
common.go feat(prompt): enhance context and intent classification in templates 2026-03-26 18:57:12 +08:00
data_analysis.go feat(prompt): enhance context and intent classification in templates 2026-03-26 18:57:12 +08:00
extract_entity.go feat(prompts): update assistant descriptions and add intent-specific templates 2026-03-25 22:08:29 +08:00
filter_top_k.go feat(prompts): update assistant descriptions and add intent-specific templates 2026-03-25 22:08:29 +08:00
into_chat_message.go feat(prompt): enhance question rewriting and intent classification in prompt templates 2026-04-16 23:15:02 +08:00
load_history.go feat(prompts): update assistant descriptions and add intent-specific templates 2026-03-25 22:08:29 +08:00
memory.go feat(prompts): update assistant descriptions and add intent-specific templates 2026-03-25 22:08:29 +08:00
merge.go feat(logger): implement LLM debug logging functionality 2026-04-16 23:15:02 +08:00
merge_expand.go feat(prompts): update assistant descriptions and add intent-specific templates 2026-03-25 22:08:29 +08:00
merge_faq.go feat(prompts): update assistant descriptions and add intent-specific templates 2026-03-25 22:08:29 +08:00
merge_history.go feat(prompts): update assistant descriptions and add intent-specific templates 2026-03-25 22:08:29 +08:00
merge_overlap.go refactor(postgres): optimize vector retrieval and HNSW settings 2026-04-17 12:11:03 +08:00
plugin_test.go feat(prompt): enhance context and intent classification in templates 2026-03-26 18:57:12 +08:00
query_expansion.go feat(prompts): update assistant descriptions and add intent-specific templates 2026-03-25 22:08:29 +08:00
query_understand.go feat(prompt): enhance question rewriting and intent classification in prompt templates 2026-04-16 23:15:02 +08:00
rerank.go refactor(chat_pipeline): improve regex patterns for table parsing 2026-03-25 22:08:29 +08:00
rerank_clean_test.go feat(prompts): update assistant descriptions and add intent-specific templates 2026-03-25 22:08:29 +08:00
search.go feat(logger): implement LLM debug logging functionality 2026-04-16 23:15:02 +08:00
search_entity.go feat(logger): implement LLM debug logging functionality 2026-04-16 23:15:02 +08:00
search_parallel.go feat(web-search): refactor web search provider 2026-03-31 20:22:34 +08:00
web_fetch.go feat(web-search): refactor web search provider 2026-03-31 20:22:34 +08:00