Skip to content

Fix summarization custom prompt file support and consolidate config lookups#64

Merged
prasjaiswal merged 1 commit intomainfrom
fix/consolidate-prompt-config-and-summarization
Feb 15, 2026
Merged

Fix summarization custom prompt file support and consolidate config lookups#64
prasjaiswal merged 1 commit intomainfrom
fix/consolidate-prompt-config-and-summarization

Conversation

@prasjaiswal
Copy link
Collaborator

Summary

  • Fix: Summarization now respects custom prompt_file from site config, matching decontextualization behavior
  • Refactor: Consolidate 6 duplicate prompt config lookups into a single get_site_prompts_config() entry point
  • New helper: get_site_prompt_file() shared by both decontextualization and summarization paths

Problem

When a site configured a custom prompt_file in config.yaml, decontextualization correctly loaded prompts from that file, but summarization always searched only the default query_analysis.xml — silently ignoring custom summarization prompts.

Changes

File Change
handler.py Add get_site_prompts_config() and get_site_prompt_file(), refactor existing helpers to use them
summarizer.py create_summarizer_from_prompt_ref() accepts optional prompt_file, searches it first
postQueryProcessing.py Use shared get_site_prompt_file() from handler instead of local duplicate
aajtak.py Use shared get_site_prompt_file() instead of inline config lookup

Test plan

  • make check passes (ruff, pyright, 252 tests)
  • make dev — tested both site: "all" and site: "aajtak.in" queries successfully

🤖 Generated with Claude Code

… file support

- Add get_site_prompts_config() as single entry point for all prompt config access
- Add get_site_prompt_file() helper, used by both decontextualization and summarization
- Fix create_summarizer_from_prompt_ref() to search custom prompt files before default XML
- Replace inline config lookups in handler.py and aajtak.py with shared helpers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@prasjaiswal prasjaiswal merged commit fb67ca2 into main Feb 15, 2026
5 checks passed
@prasjaiswal prasjaiswal mentioned this pull request Feb 15, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant