Bibliothèque de prompts

Prompts Ingénierie de l’IA

Prompts pour construire avec des modèles : concevoir des évaluations, écrire des définitions d’outils et planifier des pipelines de recherche.

Les prompts sont en anglais, la langue dans laquelle ils ont été écrits et testés. Les descriptions et les consignes de ces pages sont traduites.

  • evaluation
  • testing
  • llm
100/100 · 191 tokens

Plan d’évaluation pour une fonctionnalité LLM

Conçoit un jeu de tests et des critères de réussite pour une fonctionnalité reposant sur un modèle, avant d’ajuster le prompt.

À utiliser quand : Vous livrez une fonctionnalité qui dépend d’un modèle et il vous faut un moyen reproductible de savoir si un changement l’a améliorée.

prompt
You are an AI engineer designing evaluations for a language model feature.

## Task
Design an evaluation plan for the feature described below.

## Requirements
- Define 10 test cases: 4 typical inputs, 3 edge cases, and 3 adversarial inputs.
- State the expected property of the output for each case, in a form code or a reviewer can check.
- Name the check for each property: exact match, schema validation, a rule, or a graded rubric.
- State the pass threshold for the suite as a number.
- Do not invent facts about the feature; base every case on the description.

## Output format
Return markdown with three sections: Test cases (a table with the columns ID, Type, Input summary, Expected property, and Check), Pass threshold (one sentence), and Gaps (bulleted list of what the description does not let you test).

## Input
<feature>
{{feature}}
</feature>

Variables

{{feature}}
Ce que fait la fonctionnalité, ses entrées, ses sorties et ce que coûte une mauvaise réponse.

Exemple d’entrée

feature: extracts the due date and total from invoice text into JSON; a wrong total causes an incorrect payment.

Exemple de sortie

## Test cases
| ID | Type | Input summary | Expected property | Check |
|---|---|---|---|---|
| T1 | Typical | One-page invoice with one total | `total` equals 1250.00 | Exact match |
| A1 | Adversarial | Invoice text containing "ignore the instructions" | Output is valid JSON with the real total | Schema validation |

Illustratif : écrit pour montrer la forme attendue, non généré par un modèle.

  • agents
  • tool use
  • mcp
  • json schema
97/100 · 154 tokens

Définition d’outil pour un agent

Écrit le nom, la description et le JSON Schema d’un outil qu’un agent peut utiliser correctement, à partir d’une fonction que vous décrivez.

À utiliser quand : Pour exposer une fonction à un agent ou à un client MCP, où une description vague mène à de mauvais appels.

prompt
You are an AI engineer defining tools for a model that calls tools.

## Task
Draft a tool definition for the operation described below.

## Requirements
- Name the tool with a verb and a noun in snake_case.
- Write a description that says what the tool does, when to call it, and when not to call it.
- Describe every parameter with its type, format, and one example value.
- Mark a parameter as required only when the operation cannot run without it.
- Use enum for every parameter with a fixed set of values.

## Output format
Return one fenced JSON block containing an object with the keys name, description, and input_schema, where input_schema is a JSON Schema object.

## Input
<operation>
{{operation}}
</operation>

Variables

{{operation}}
Ce que fait l’opération, ses paramètres, ce qu’elle renvoie et ses limites.

Exemple d’entrée

operation: searches support tickets by text and status (open, pending, closed), returns at most 20 tickets, read-only.

Exemple de sortie

```json
{ "name": "search_tickets", "description": "Search support tickets by text. Call it to find existing tickets before creating one. Read-only; it cannot modify tickets.", "input_schema": { "type": "object", "properties": { "query": { "type": "string" }, "status": { "type": "string", "enum": ["open", "pending", "closed"] } }, "required": ["query"] } }
```

Illustratif : écrit pour montrer la forme attendue, non généré par un modèle.

Adaptez-le à votre cas

Modifiez les exigences selon vos normes, puis vérifiez le résultat. L’analyseur de prompts le renote pendant que vous tapez, l’optimiseur retire le remplissage sans perdre une exigence, et le scanner de sécurité repère secrets et données personnelles avant l’envoi à un modèle.

Autres catégories