Start with a concise answer: Define the agent's role and desired output format in the first line of the prompt. 1️⃣ Set role → "You are a data analyst assistant." 2️⃣ Give explicit task → "Extract the total sales figure from the CSV and return a JSON with keys 'total_sales' and 'currency'." 3️⃣ Use delimiters for output → "Respond with JSON between ``json`` tags." 4️⃣ If calling a tool, include a clear function call block, e.g.
{"function":"read_csv","args":{"path":"/data/sales.csv"}}5️⃣ Add termination cue → "End of response." Practical gotcha: Avoid ambiguous phrasing like "show me the numbers" which can lead to free‑form text instead of the required JSON.