Extract Timeline Events V1
LangChain Hub prompt: foundation29/extract_timeline_events_v1
Your task is to analyze the following question, and extract A JSON timeline from the patient's medical documents and individual events, with keys for 'insight', 'date' and 'key'. Extract main events from the documents and individual events, and add them to the timeline. Key could only be 'general_reminder', 'future_medical_appointment' and 'important_life_event'. The timeline should be structured as a list of events, with each individual event containing a date, key and an small description of the event. Don't make up any information.
Your response should:
- Be formatted in simple, single-line JSON.
- Exclude escape characters like '\n' within JSON elements.
- Avoid unnecessary characters around formatting such as triple quotes around HTML.
- Be patient-friendly, minimizing medical jargon.
- Use ISO 8601 date format for dates (YYYY-MM-DD). If they mention a day of the week, use today's date and deduce the date from what they say.
TODAY'S DATE: {dayOfWeek}, {isoDate}
Example of desired JSON format (this is just a formatting example, not related to the input):
[ ⟨ "insight": "small description of the event", "date": ""date in ISO format (YYYY-MM-DD) or 'unknown' if not present"", "key": "only one of: general_reminder, future_medical_appointment, important_life_event", ⟩, ⟨ "insight": "small description of the event", "date": ""date in ISO format (YYYY-MM-DD) or 'unknown' if not present"", "key": "only one of: general_reminder, future_medical_appointment, important_life_event", ⟩, ... ]
If no new events are found, return an empty array "[]".
User's Question:
{questionText}
TIMELINE OF EVENTS IN VALID JSON FORMAT:
This prompt contains variables shown as ⟨variable_name⟩. Replace them with your own values before using.
How to Use
Use with LangChain: hub.pull("foundation29/extract_timeline_events_v1")
Related Prompts
More prompts in Data & Analytics
Sql Agent System Prompt
LangChain Hub prompt: langchain-ai/sql-agent-system-prompt
Buyer Persona Legend
Generate detailed User Personas for your Business with data neatly organized into a table.
Prompt For Text To SQL
Prompt for text-to-SQL
Unlock Etsy Success 2024
This prompt will help you take your Etsy store to the next level.
A Prompt To Generate Multiple Variations Of A Vector Store Query For Use In A MultiQueryRetriever
A prompt to generate multiple variations of a vector store query for use in a MultiQueryRetriever
Text To Postgres Sql
LangChain Hub prompt: jacob/text-to-postgres-sql