Bonnes pratiques agents

Don’t :

  • Use markdown or other formatting.
  • Make references to articles or text if the agent has no access to it.
  • Use place holders if the informations is not already present (for it could increases possible hallucinations).
  • Use uppercases if not necessary
  • Use multiple level bullet points

Do :

  • Keep it as short and easy possible, no ambiguity.
  • Think about the deeper meaning of key words and use them properly (rules, guidelines, instructions …).
  • Build it step by step, if the agent needs to conduct sub-tasks before doing its main tasks make sure each sub-task is done properly before implementing the main task (for it will not be possible to find the problem otherwise).

Tricks

Forcing Precise Terms

Sometimes you need to guarantee that some words appear exactly as expected, with control. This can be brand names, or specific product names. Let’s take an exemple of a brewery which has precise beer names. To do this we recommend adding in the Critical Instructions of the agent, the following two lines. Note that the last line (coupled with “pronounced”) clarifies wrong spelling (often due to poor audio-to-text transformations), allowing AI to understand and fix to beer name correctly.

  • Official beers from Lune & Brume Brewery: Feain (pronounced “faim”), Nebula, Troublonne, Éclat, Maramba, Orage, Dromadaire, Sombrelune, Mirage IPA, Mirage Rouge. Keep exact wording, only fix typos/case, and contextualize naturally.
  • "faim" = "Feain" beer.