> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wittify.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Chat with Your Documents

> A conversational AI interface for document Q&A and knowledge extraction. Ask questions over your files and over read-only databases in the same chat.

<Note>
  **Chat with Your Documents** combines two things in one chat surface: ask questions over your uploaded documents with inline citations, and ask questions over your live databases that auto-render as Plotly charts.
</Note>

## What you can do

<CardGroup cols={2}>
  <Card title="Ask questions across documents" icon="file-magnifying-glass">
    Upload PDFs, DOCX, and XLSX files. The system reads them, splits them into chunks, and indexes them. Ask anything in any language and get answers with inline `[1] [2]` citation chips you can click to inspect the source chunk.
  </Card>

  <Card title="Query live databases" icon="database">
    Connect a read-only SQL source (Postgres, MySQL, SQL Server, Snowflake, BigQuery, and others). Ask questions, the system writes the SQL for you, runs it, and renders the result as a Plotly chart inline.
  </Card>

  <Card title="Mix documents and SQL in one turn" icon="shuffle">
    Some questions need both. The agent picks **Auto**, **RAG** (documents), or **SQL** per turn, and shows tool tags (**RAG**, **SQL · {source}**, **RAG + SQL**, **RAG · HyDE**) so you always see which path was taken.
  </Card>
</CardGroup>

## Start here

<CardGroup cols={2}>
  <Card title="Welcome" icon="hand-wave" href="/en/Systems/Chat-with-Documents/Welcome">
    The page you land on the first time you open the product.
  </Card>

  <Card title="Knowledge Bases" icon="folder-tree" href="/en/Systems/Chat-with-Documents/Knowledge-Bases">
    Create a knowledge base and add documents.
  </Card>

  <Card title="SQL Data Sources" icon="database" href="/en/Systems/Chat-with-Documents/SQL-Sources">
    Connect a read-only database to chat with.
  </Card>

  <Card title="Chat Canvas" icon="message-bot" href="/en/Systems/Chat-with-Documents/Chat-Canvas">
    Start a new conversation.
  </Card>
</CardGroup>

## Pages in this system

<CardGroup cols={2}>
  <Card title="Welcome" icon="hand-wave" href="/en/Systems/Chat-with-Documents/Welcome">
    Lands here on first sign-in. Picks your first project and forwards you to its Overview. The empty-roster state shows a **Create new project** CTA.
  </Card>

  <Card title="Project Overview" icon="grid-2" href="/en/Systems/Chat-with-Documents/Project-Overview">
    Per-project home with knowledge-base count, document count, SQL-source count, and recent chats.
  </Card>

  <Card title="Knowledge Bases" icon="folder-tree" href="/en/Systems/Chat-with-Documents/Knowledge-Bases">
    Document collections with primary language and chunking settings. Three-tab detail (**Documents** / **Scope summary** / **Settings**), plus create and delete.
  </Card>

  <Card title="Documents" icon="file" href="/en/Systems/Chat-with-Documents/Documents">
    PDF, DOCX, and XLSX uploads with a status pipeline (**pending**, **parsing**, **chunking**, **embedding**, **ready** or **failed**). Per-doc tags, scope info, and a chunk inspector with inline edit.
  </Card>

  <Card title="SQL Data Sources" icon="database" href="/en/Systems/Chat-with-Documents/SQL-Sources">
    Read-only database connections — your credentials are stored encrypted. **Schema** / **Semantic terms** / **History** / **Connection** tabs. Bilingual semantic glossary so you can teach the agent your terminology.
  </Card>

  <Card title="Chats" icon="comments" href="/en/Systems/Chat-with-Documents/Chats">
    Conversation history with **Active**, **Archived**, and **Deleted** views. Sessions bind the knowledge bases and SQL sources you chose.
  </Card>

  <Card title="Chat Canvas" icon="message-bot" href="/en/Systems/Chat-with-Documents/Chat-Canvas">
    The single-session view. Composer with drag-drop attachments, force-tool dropdown, scope-override chips, and streaming responses.
  </Card>

  <Card title="Project Settings" icon="gear" href="/en/Systems/Chat-with-Documents/Project-Settings">
    Project name, deletion (with typed-keyword confirmation), permissions, sharing.
  </Card>

  <Card title="Share Links" icon="link" href="/en/Systems/Chat-with-Documents/Share-Links">
    Visitor-facing chat surface. Chatbot or snapshot mode, optional password gate, configurable scope, admin read-back of visitor sessions.
  </Card>
</CardGroup>

## Tool transparency tags

Every assistant message carries one or more tags so you know how the answer was produced.

| Tag                     | Meaning                                                   |
| ----------------------- | --------------------------------------------------------- |
| **RAG**                 | Pulled from your uploaded documents.                      |
| **SQL · {source}**      | Wrote and ran SQL against the named data source.          |
| **RAG + SQL**           | Combined both in the same answer.                         |
| **RAG · 2 sub-queries** | Decomposed your question into multiple retrieval steps.   |
| **RAG · HyDE**          | Generated a hypothetical answer first to guide retrieval. |

The tags stay in English on Arabic pages (they're technical labels).

## Common questions

<AccordionGroup>
  <Accordion title="What file types can I upload?">
    PDF, DOCX, and XLSX. There's a per-file size limit shown on the upload screen, plus an overall storage cap per project. Other formats are not supported today.
  </Accordion>

  <Accordion title="Can I share a chat with someone outside Wittify?">
    Yes, via [Share Links](/en/Systems/Chat-with-Documents/Share-Links). You can publish either a chatbot mode (visitors can ask new questions, scoped to whatever you allow) or a snapshot mode (visitors can read a frozen conversation but can't continue it).
  </Accordion>

  <Accordion title="My SQL source is read-only, but is it really safe?">
    Yes — read-only access is enforced at multiple levels. You connect with read-only credentials, and any data-modifying SQL is blocked. Even so, only connect to databases where read-only access is acceptable.
  </Accordion>

  <Accordion title="The answer cited a document but I can't find the quote in my file.">
    Click the citation chip in the answer. The chunk inspector opens with the exact source text the answer was built from. If you've updated the file since, re-upload it so the index reflects the new content.
  </Accordion>

  <Accordion title="Why did the agent pick SQL when I expected it to use my documents?">
    You can override per turn. Click the tool dropdown next to the composer and pick **RAG** (documents), **SQL**, or **Auto**. Or use the scope chips to narrow which knowledge bases or sources are in play for that turn.
  </Accordion>

  <Accordion title="Can the agent answer questions in mixed Arabic and English?">
    Yes. The embedding model supports 100+ languages and the agent mirrors your question's language back at you in the answer. Mixed-language documents are supported, and the system never strips Arabic diacritics or normalises bidi characters.
  </Accordion>
</AccordionGroup>
