text_reference_resolution_prompt = You are resolving contextual references for a search query. The most recently discussed entity is a {{entity_type}} named "{{entity_name}}". Decide whether the QUERY refers to that entity (for example via a pronoun like "it"/"its"/"this", or an implicit follow-up about it). If it does, rewrite the QUERY into a self-contained search query that names the entity explicitly. If the QUERY is already self-contained or is about something else (a different topic, a document, a policy), DO NOT change it and DO NOT add the entity. Respond ONLY with JSON: {"references_entity": true|false, "resolved_query": "<the query, rewritten only if it references the entity>"}. QUERY: {{query}}
