# Answer from your documents (Knowledge)

> Make a knowledge base from your help articles, FAQs and manuals, try questions on it, publish it, and have your Agents put it in your app.

Source: https://air.build/docs/services/answer-from-your-documents/

AirKnowledge lets people ask questions about your documents inside your app, and see the sources behind each answer. You put help articles, FAQs or manuals into a knowledge base in the Project's **Knowledge** tab, try questions on it, and publish it. Your Agents then connect the features of your app to the knowledge base each one needs.

AirKnowledge itself is free with AirBuild, but the answers your app gives are paid like any AI call it makes. **Try It** in the tab uses AirBuild AI.

## Open the Knowledge tab

**iPhone**

Open the Project's chat and tap the tabs button (four squares) in the top-right corner. In the list under the tab cards, tap **Knowledge**.

**Mac**

Open the Project's chat and choose **View › Go To › Knowledge**. You can also open the inspector (**View › Show Inspector**, ⌥⌘I), click **New Tab** (**+**) and click **Knowledge**.

## Turn on AirKnowledge and make a knowledge base

AirKnowledge starts off in every Project. Anyone in the Team can turn it on.

1. In the **Knowledge** tab, tap **Turn On AirKnowledge**.
2. Tap **New Knowledge**.
3. Type a **Name** and tap **Create**. "Name it for what it holds, like Help Center or Product FAQ. The agents choose which knowledge base each feature of the app reads."

Turning AirKnowledge on doesn't ask your Agents for anything yet. You ask them once a version is published (see [Put it in your app](https://air.build/docs/services/answer-from-your-documents/#put-it-in-your-app)).

A Project can have more than one knowledge base. The name at the top of the tab has a menu (**⋯**) to switch to another one, and **New Knowledge…**, **Rename…** and **Delete…**.

## Add your documents

The **Upload** card says "Drop files or a folder here" and "PDF, Word, HTML, Markdown, text or CSV, several at once."

- Tap **Add Files** to pick files or a folder. A folder adds the readable files inside it and its subfolders.
- Tap **Paste Text** to paste text. Give it a **Name** (otherwise it's called "Pasted text") and tap **Add**.
- Drop files or folders anywhere on the page.

While files are added, the card says "Adding 2 of 5…" and offers **Cancel**. Each file is turned into text. A file that can't be used stays on the card with its reason:

| Reason | What to do |
| --- | --- |
| "Can't read this kind of file" | Use PDF, Word (.docx), HTML, Markdown, plain text, CSV or TSV. |
| "Couldn't read this file" | Check that the file opens on your device, then add it again. |
| "No text in this file" | AirBuild found no text it could read in the file. Add a version of it with text. |

The card then says how many files weren't added. **Clear** takes them off.

Added files appear under **Files**, with their **Source**, **Kind**, **Size**, **Language** and **Sections / Columns**. A file that isn't in the live version yet is marked **New**; a changed one **Updated**; one you removed **Removed**, with **Undo** to put it back. To remove a file, use **Remove** on its row.

## Try questions before you publish

**Try It** answers from the files on the page the way your app will answer once they're published.

1. In **Try It**, type into **Ask what your users might ask** and send it.
2. The answer shows what it did (for example "Read _file_", "Searched for “_words_”" or "Listed the files"), then the answer and the files it came from. "No sources cited." means the answer named none.
3. Ask a follow-up. Each question is asked with the ones before it. **New Conversation** starts over.

Until you add a file, **Try It** says "Add sources to try questions."

## Publish

Under **Files**, a line says what publishing would change, for example "Changes since the live version: 2 added, 1 updated." Before the first publish it says "These files aren't published yet."

1. Tap **Publish** in the bar under the page.
2. When it's done, the line says "These sources are live." Your app now answers from this version.

To throw away your changes instead, tap **Discard** in the same bar and confirm **Discard Changes?**. If a version is live: "The files go back to the live version." If nothing is published yet: "Every file leaves this page. Your originals stay where they are."

## Put it in your app

Once a version is live, **Add to App with Agent** appears in the bar under the page. On iPhone, beside **Discard** and **Publish**, it can read **Add to App**.

1. Tap **Add to App with Agent**.
2. A message naming the knowledge base goes into the Project's chat, and the chat comes forward.
3. The button says **Sent to Project Chat**: "The agents will add it to the app."

## History: roll back or unpublish

**History** shows the **Live** version, the one your app answers from, and the **Previous** one, kept so you can put it back. Before the first publish it says "Nothing published yet."

Tap a version to see its sources and when it was published. At the bottom:

| Action | Confirmation |
| --- | --- |
| **Roll Back…** (on the previous version) | **Roll Back to This Version?** "Your app answers from this version again. The live version is kept as the previous one, so you can switch back." |
| **Unpublish…** (on the live version) | **Unpublish?** "Your app stops answering from these files until you publish again or roll back." |
| **Publish Again…** (on the previous version, when nothing is live) | **Publish This Version Again?** "Your app answers from this version again." |

## Delete a knowledge base or turn AirKnowledge off

- **Delete a knowledge base**: open the menu beside its name and choose **Delete…**. Confirm **Delete Knowledge Base?**: "“_name_” and its files are deleted. Features of the app that answer from it stop answering."
- **Turn AirKnowledge off**: at the bottom of the tab, tap **Turn Off** and confirm **Turn Off AirKnowledge?**: "Your app stops answering from its knowledge bases until AirKnowledge is turned back on. They are kept."

## Questions

**Try It says “Your AirBuild AI quota has been reached.”**

**Try It** uses your AirBuild AI quota. Tap **Plan & Usage** to see your plan. See Settings › [Plan & Usage](https://air.build/docs/settings/plan-usage/).

**Try It says “The model isn't available right now.”**

Tap **Try Again** in a moment.

**Publishing fails with “This knowledge is too large to publish.”**

Remove some sources and publish again.

**“Your changes couldn't be saved.”**

Your changes to the files didn't reach AirBuild. Tap **Try Again**.

**“Couldn't Delete the Knowledge Base”**

The delete was refused and the knowledge base is back in the list. The alert says why.

**A version says “This version is no longer kept.”**

AirBuild no longer has that version's files, so they can't be shown.

**Can my Agents read the knowledge base?**

Yes, with `workers knowledge`, which is read-only. Writing and publishing happen in the **Knowledge** tab. See [workers](https://air.build/docs/cli/workers/).
