# Information schema

{% embed url="<https://youtu.be/pLuRONv1DeA>" %}

The information schema is used to create structured data from unstructured data like PDF files, text files etc. This structured information provides insights into important information from large files with the help of LLM models, which can be used for decision-making and querying the bot.

### **The steps to create and use information schema are as follows -**

1. From the available knowledge bases, select one to create an information schema.
2. Navigate to the Information Schema tab and click the ‘+Add New’ button.

<figure><img src="https://3781630280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbuSicczDKTyHzwzicar%2Fuploads%2FyJWWDRdCEN7YVrPP1HKx%2Fimage.png?alt=media&#x26;token=b776e4da-d087-48a0-b0f8-970c63cf9340" alt=""><figcaption></figcaption></figure>

3. Click on the ‘+ Add New’ button to open a panel. Here, you can enter a new schema name, select the desired LLM, and choose one of the following options:

   * Fill the column against every page in the file
   * Fill the column against every chunk in the file

   Select your preferred option and click ‘Add’ to proceed.

<figure><img src="https://3781630280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbuSicczDKTyHzwzicar%2Fuploads%2FC4uk2C0KfQCHxIEw1iPv%2Fimage.png?alt=media&#x26;token=e865bf53-7dd4-4764-a6d2-a874040de791" alt=""><figcaption></figcaption></figure>

4. Click the ‘+’ button to add the column details you want to extract from the unstructured data. In the panel, provide a column name, choose the data type (either text or integer), and enter a prompt to retrieve the data. Once you've entered all the details, click Add. If needed, you can add multiple columns by clicking the ‘+’ button for each one.

<figure><img src="https://3781630280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbuSicczDKTyHzwzicar%2Fuploads%2FLGfuVAsnmrrnAbVgOpUO%2Fimage.png?alt=media&#x26;token=498044c7-a7c2-4962-8565-2c321763ccf5" alt=""><figcaption></figcaption></figure>

5. Click the ‘Run Schema’ button at the top right to execute the information schema you have created. Once the run is completed, you can view the results. With the information schema results, you will be able to query data using both the knowledge base and the newly created information schema.

<figure><img src="https://3781630280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbuSicczDKTyHzwzicar%2Fuploads%2FaVqzPpHY9ca0GLmMeR07%2Fimage.png?alt=media&#x26;token=c20c200b-d9a3-42ba-a86c-3001b25bdd9a" alt=""><figcaption></figcaption></figure>

6. Click the ‘Delete Schema’ button to remove the schema you created.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zbrain.ai/zbrain-documentation/zbrain-builder/knowledge-base/information-schema.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
