mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-16 01:35:36 -04:00
Inject current date into deep research planning and query prompts (#1347)
Deep research generated search queries from the LLM's training-cutoff knowledge, so it emitted stale-year queries like "best Python tutorials 2025" when the actual year is later (issue #1341). The chat/agent path already grounds the model with "Today is ..." (src/agent_loop.py); the deep research planning and query-generation prompts had no equivalent. Add a small current_date_context() helper and prepend it at the plan and query-generation prompt sites (and the research_handler plan preview path that reuses RESEARCH_PLAN_PROMPT). System-TZ local, portable strftime. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -161,10 +161,10 @@ class ResearchHandler:
|
||||
) -> Optional[dict]:
|
||||
"""Generate a research plan for user review before starting research."""
|
||||
try:
|
||||
from src.deep_research import RESEARCH_PLAN_PROMPT
|
||||
from src.deep_research import RESEARCH_PLAN_PROMPT, current_date_context
|
||||
from src.llm_core import llm_call_async
|
||||
|
||||
prompt = RESEARCH_PLAN_PROMPT.format(question=query)
|
||||
prompt = current_date_context() + RESEARCH_PLAN_PROMPT.format(question=query)
|
||||
response = await llm_call_async(
|
||||
url=llm_endpoint,
|
||||
model=llm_model,
|
||||
|
||||
Reference in New Issue
Block a user