> For the complete documentation index, see [llms.txt](https://docs.opencityitalia.it/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.opencityitalia.it/ai/come-funziona/base-di-conoscenza-e-istruzioni/le-istruzioni.md).

# Le istruzioni

Le istruzioni definiscono come l'assistente deve comportarsi. Sono regole operative scritte in linguaggio naturale, che guidano il modo in cui interpreta le richieste, produce i contenuti e gestisce situazioni specifiche.

<figure><img src="https://793214105-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0AdQysODIf5E7oHfQAtY%2Fuploads%2Fq5iqkw6TzyYgJOTbAwaa%2FScreenshot%202026-06-12%20alle%2015.02.16.png?alt=media&amp;token=ecb8f8d5-7624-4c78-8c09-edd4bde5ecd8" alt=""><figcaption></figcaption></figure>

La piattaforma include un set di istruzioni precaricate che coprono i comportamenti di base comuni a tutti gli enti. Ogni ente può modificarle o integrarle con le proprie regole operative, descrivendo i processi interni così come funzionano nella realtà. Più l'assistente conosce il contesto in cui opera, più le sue risposte risultano coerenti con i processi reali, riducendo la necessità di correggere o riformulare.

## Creare una nuova istruzione

{% hint style="info" %}
Durante la generazione, il sistema usa le direttive inserite per definire automaticamente:

* la lista delle funzioni utili all'esecuzione dell'istruzione;
* i metadati;
* una breve descrizione.

Queste informazioni aiutano l'assistente a eseguire correttamente l'istruzione.
{% endhint %}

Per creare una nuova istruzione, bisogna accedere alla sezione "Istruzioni" nel menu laterale e cliccare sul pulsante "Nuova istruzione".

<figure><img src="https://793214105-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0AdQysODIf5E7oHfQAtY%2Fuploads%2F1UME61FGHU98FNpaxO8G%2Fimage.png?alt=media&amp;token=21ee29f5-86a3-43b4-aaf2-4c9f058a37c1" alt=""><figcaption></figcaption></figure>

Il processo è guidato: il funzionario descrive in parole proprie cosa deve fare l'istruzione, indica la knowledge base di riferimento ed eventuali istruzioni correlate già presenti. L'assistente genera una bozza che si può modificare o rigenerare e accompagna il funzionario fino alla configurazione dei metadati e all'anteprima finale.

Una volta salvata, l'istruzione è ricercabile per nome. Può essere attivata manualmente dalla sezione dedicata per avviare una conversazione in chat legata a quella specifica attività; in alternativa, sarà l'assistente a richiamarla autonomamente quando la richiesta lo richiede. Le istruzioni esistenti si possono scaricare, modificare o eliminare in qualsiasi momento.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.opencityitalia.it/ai/come-funziona/base-di-conoscenza-e-istruzioni/le-istruzioni.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
