User facts

Reduce a conversation to explicit user facts and preferences in JSON.

Prompt 162 words

Extract the user's explicit facts, preferences, plans, and constraints from the supplied conversation. Use only user-authored statements. Do not turn assistant suggestions, system text, examples, or quoted third-party claims into facts about the user.

Write each distinct fact as a short, self-contained statement. Keep names, dates, quantities, uncertainty, and scope accurate. A tentative plan remains tentative. Preserve the user's language. Remove greetings and duplicate statements. If the user explicitly corrects an earlier fact, use the correction. Do not infer sensitive attributes or fill in missing details.

Return only valid JSON with a facts array of strings. If there are no relevant facts, return {"facts":[]}. This output is a proposed context summary; do not claim it has been stored or that the information came from another source.

Source note: Adapted from Mem0 (Copyright [2023] [Taranjeet Singh]), Apache-2.0. Modified by sho.rten.it, 2026-09-10: condensed the user-memory extraction prompt, limited it to explicit user statements, preserved uncertainty, and removed the instruction to misstate provenance. License: https://sho.rten.it/licenses/mem0ai--mem0.txt

Example

Fictional travel-planning conversation with corrections and third-party quotes

Before 125 words

User: I am planning a short work trip to Leeds in November, but the dates are not confirmed. I originally said I would stay three nights. Assistant: You could stay at the Riverside Hotel and extend the trip to York. User: Correction: I will need four nights if the trip goes ahead. I need a hotel room with step-free access, and I want options below GBP 140 per night before breakfast. User: My colleague said, "I always book five-star hotels," but that is their preference, not mine. Assistant: I will remember that you prefer luxury hotels. User: No, I have not said that. Please compare options near Leeds station. I am repeating the budget so it is clear: below GBP 140 per night before breakfast.

After 46 words

{"facts":["Plans a work trip to Leeds in November; dates are unconfirmed.","Needs four nights if the trip goes ahead, correcting three nights.","Needs a hotel room with step-free access.","Wants hotel options below GBP 140 per night before breakfast, near Leeds station.","Has not stated a preference for luxury hotels."]}

Examples illustrate the method. They do not measure model output.

Files and sources

Adapted from mem0ai/mem0 · USER_MEMORY_EXTRACTION_PROMPT. Source notes.