prebuilt.tldr2.prompts¶
Prompt templates for the News Research Agent.
This module contains all prompt templates used by the news research agent. Prompts are separated from engines for better maintainability and reusability.
Each prompt is designed for a specific task in the research workflow and includes detailed instructions for the LLM.
Example
>>> from news_research.prompts import SEARCH_GENERATION_PROMPT
>>> prompt = SEARCH_GENERATION_PROMPT.format(research_topic="AI in healthcare")
Note
Prompts use LangChain’s ChatPromptTemplate for message-based formatting and support variable substitution for dynamic content.
Functions¶
|
Create a custom prompt template dynamically. |
Module Contents¶
- prebuilt.tldr2.prompts.create_custom_prompt(system_message, human_template, include_messages=True)¶
Create a custom prompt template dynamically.
- Parameters:
- Returns:
Configured prompt template
- Return type:
ChatPromptTemplate
Example
>>> prompt = create_custom_prompt( ... "You are an expert researcher", ... "Research {topic} and provide insights" ... )