# How Knowledge works

> How TulipFarm reads files, scans, notes, and connected apps, finds and cites the passages an answer uses, checks your access, and syncs changes.

Source: https://tulipfarm.ai/docs/knowledge/how-knowledge-works/

Knowledge is how TulipFarm turns your company knowledge into answers you can check. It reads the files, notes, and app content you add, finds the passages that answer a question, and links each answer to those passages. It never shows anyone material they can't already open at the source.

This page explains how that works. To add material, see [Add files and apps to Knowledge](https://tulipfarm.ai/docs/knowledge/add-to-knowledge/index.md). For exact limits, see [Knowledge sources and limits](https://tulipfarm.ai/docs/knowledge/sources-and-limits/index.md).

## What goes into Knowledge

Knowledge holds four kinds of material: content from the apps you connect, files you add from **Files**, notes you approve in a chat, and recaps of your closed chats.

**Connected apps.** When you connect Google Drive, Gmail, Slack, GitHub, Jira, or Confluence, TulipFarm adds the content your account can see in that app to your Knowledge. This is called automatic Knowledge. Only you can search what it adds. You can narrow what is added, stop automatic Knowledge for an account, or pause a single source.

Connected content stays in sync with the app:

- TulipFarm reads the current version of each file, page, issue, or message.
- About once an hour, it looks for new channels, projects, spaces, and repositories that you can see, and adds them.
- On GitHub, a push, issue, pull request, or discussion starts a sync of that item or repository right away.
- When you pause or remove a source, TulipFarm keeps that choice. It doesn't add the source back later.

**Files.** When you add a file from **Files**, TulipFarm saves the text of the file as it is at that moment. It doesn't follow later edits to the file. If someone deletes the file, or you lose access to it, TulipFarm stops using it.

**Notes.** In a chat, you can ask TulipFarm to save a note to your Knowledge. It shows you the note first. Nothing is saved until you approve it.

**Chat recaps.** When a chat closes, TulipFarm writes a short recap of it and adds the recap to Knowledge. Later answers can cite it as a **Chat recap**. Only people who can read the original chat can search its recap.

TulipFarm splits each item into short passages. A passage is the unit that search finds and that a citation points to. Parts that TulipFarm couldn't read, such as an image it couldn't recognize, are reported as gaps. They are never left out silently.

## How search works

When a chat or agent needs facts, it searches your Knowledge across all of your sources at once, then answers from the passages it finds.

Search uses two methods:

- **Keyword search** matches the words in your question. New content is ready for keyword search as soon as TulipFarm has read it.
- **Meaning-based search** finds passages that answer the question in different words. It becomes available a little later than keyword search. It can wait longer when the workspace is low on [credits](https://tulipfarm.ai/docs/concepts/credits/index.md).

Search only reads. It doesn't change files, send messages, or approve actions. When a chat or agent wants to act in another app, the usual [approvals](https://tulipfarm.ai/docs/concepts/approvals/index.md) apply. TulipFarm treats the text it finds as information, never as instructions to follow.

The search box that opens with Cmd+K or Ctrl+K helps you move around TulipFarm. It doesn't search your Knowledge. To search Knowledge, ask in a chat.

## Citations

Each answer that uses Knowledge links to the passages it used. A citation names the kind of source, such as **File**, **Note**, **Chat recap**, **Google Workspace**, **Slack**, **GitHub**, **Jira**, or **Confluence**. When it can, it also shows where the passage is, such as a page, a slide, or a sheet.

A citation opens the exact passage that the answer used. If the source has changed, was removed, or your access ended, TulipFarm hides the passage and shows this message: "This source changed, was removed, or your access ended. Its passage is hidden. Ask again to search current knowledge."

## Permissions and access checks

Knowledge never widens who can see something. Content from a connected app is private to the person who connected it, and the app's own permissions still apply:

| Source | What decides access |
| --- | --- |
| Google Drive | Drive sharing, including group access |
| Gmail | Only the mailbox owner |
| Slack | Current membership of the channel or conversation |
| GitHub | Access to the repository, and the organization or team membership it needs |
| Jira | Project access, issue security, and comment restrictions |
| Confluence | Space, page, and group restrictions |
| Files and notes | Only the person who added them |
| Chat recaps | The people who can read the original chat |

TulipFarm checks your access again when its last check is more than five minutes old. If it can't check, it reports the source as unavailable. It doesn't report that nothing was found.

Being a workspace admin doesn't add access to anyone's Knowledge. See [Who can see what](https://tulipfarm.ai/docs/security/index.md).

## When sources disagree or a fact is missing

The answer says so. If two sources give different facts, the answer states the conflict instead of picking one without telling you. If a fact isn't in your Knowledge, the answer says that it is missing.

Search can also be incomplete. A source may be partly imported, paused, or waiting for credits, and a file may have gaps. TulipFarm reports these states. A search that covered only part of your Knowledge isn't proof that an answer is complete.

## Images and scanned pages

TulipFarm reads the text in images, photos, and scanned pages, including handwriting and languages other than English, such as Hindi. It also records what an image shows, so you can find a file by its picture. For example, you can find a photo or a scan of a handwritten bill in Hindi, and a chat can cite that page in its answer.

It reads text, charts, and diagrams in images inside PDFs, slides, and other documents in the same way. Charts that are built into a file, such as a chart in a spreadsheet, are read from the file itself.

Reading images uses credits. A workspace admin can turn it off with **Read images in documents** in **Settings**, then **General**. It is on by default. If image reading is off or the workspace has no credits left, TulipFarm keeps the rest of the file searchable, reports the images as gaps, and reads them later.

For the image types and limits, see [Knowledge sources and limits](https://tulipfarm.ai/docs/knowledge/sources-and-limits/index.md#images-and-scanned-pages).

## Knowledge, memory and project files

TulipFarm keeps three kinds of material apart:

| | Knowledge | Personal memory | Project files |
| --- | --- | --- | --- |
| What it holds | Files, notes, and content from connected apps | Your reply preferences | Files added to a project |
| Who can use it | You. Each source keeps its own permissions. | Only you | Everyone in the project |
| How it is used | Searched and cited in answers | Shapes how replies are written in your private chats and tasks | Available in the project's chats |

Personal memory is never searched or cited. It isn't used in project chats. See [Save reply preferences to personal memory](https://tulipfarm.ai/docs/knowledge/save-preferences-to-memory/index.md).

A file that you attach to a chat message is used in that chat. It doesn't become part of your Knowledge.

## Related

- [Add files and apps to Knowledge](https://tulipfarm.ai/docs/knowledge/add-to-knowledge/index.md)
- [Knowledge sources and limits](https://tulipfarm.ai/docs/knowledge/sources-and-limits/index.md)
- [Save reply preferences to personal memory](https://tulipfarm.ai/docs/knowledge/save-preferences-to-memory/index.md)
- [Approvals](https://tulipfarm.ai/docs/concepts/approvals/index.md)
- [Credits](https://tulipfarm.ai/docs/concepts/credits/index.md)
