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

# Discovery from chat

> Create and edit a Discovery without leaving chat, and keep working with finished Discoveries by attaching them as context.

<video autoPlay muted loop playsInline src="https://mintcdn.com/libra-4206ec93/azhR9hqtFjs66ITC/assets/videos/features/discovery-from-chat.webm?fit=max&auto=format&n=azhR9hqtFjs66ITC&q=85&s=773bcd62d416123dff13e971734a2d50" className="rounded-xl border w-full" data-path="assets/videos/features/discovery-from-chat.webm" />

Discoveries don't have to start on the Discovery page. From any chat you can spin up a new one, watch the first cells fill in on a preview card, and, once the run has finished, keep asking follow-up questions with the Discovery attached as context.

<div className="libra-buddy-callout">
  <img src="https://mintcdn.com/libra-4206ec93/wgVZXcGnHS4aJk9T/assets/images/libra-buddy/excited.png?fit=max&auto=format&n=wgVZXcGnHS4aJk9T&q=85&s=ff4421471ed769b8a6bb79c03cda38f3" alt="Libra mascot excited" width="729" height="648" data-path="assets/images/libra-buddy/excited.png" />

  <div className="libra-buddy-callout-content">
    Discovery citations resolve at four levels — the whole Discovery, a *column*, a *row*, or a single *cell* — and Libra is told to always cite the most specific one, so *"why is row 3's job title Innovation Manager?"* lands on that cell.
  </div>
</div>

## Before you start

You need a chat inside a project you have edit rights on: a Discovery created from chat is created in that project, and Libra builds it from **all documents currently attached to the chat**. Attach the documents you want as rows before you send, and remember that each row is one document — Libra reads them independently of one another, not as a single set.

## Create a Discovery from chat

Pick **Tools → Create new → Discovery** to commit to building one, or simply describe the extraction you want. The difference matters: with creation mode armed, Libra has to create a Discovery in that turn. Left unarmed, Libra decides for itself, and proposes a Discovery when a request amounts to asking the same questions of several documents rather than answering inline.

<Steps>
  <Step title="Pick Tools → Create new → Discovery">
    A **Discovery** badge appears in the composer's toolbar row, alongside **Tools** and the attach button, confirming what the next message will build. Click the badge to cancel creation mode.
  </Step>

  <Step title="Attach the documents and describe the columns">
    Drop in the documents you want to extract from. Type a prompt that names the fields, like *"Extract employee name, job title, and home office location for each contract"*. Libra turns each field into its own column, picking the most specific answer type it can — text, yes/no, number, date, currency, or bullet list — and writes the column labels and prompts in the language you wrote in.
  </Step>

  <Step title="Send">
    Libra creates the Discovery and starts processing it straight away, then shows a **Discovery created** card in the conversation. The card is a deliberately small preview: at most four documents and three columns, with **Columns** and **Documents** counters above the table giving the real totals. Cells fill in on the card as the run progresses.
  </Step>

  <Step title="Open Discovery to see all of it">
    Click **Open Discovery** on the card to leave the preview and open the full table. Everything beyond the first four rows and three columns lives there. Use **Add Column** and **Add Documents** to extend the Discovery; new cells are queued for calculation automatically.
  </Step>
</Steps>

<Tip>
  A Discovery created from chat is filed in the chat's project, in the **Discoveries** system folder of [Project files](/en/features/documents/folder-structure). From the full-screen view you can **Save as Template** — worth doing the second time you build something similar.
</Tip>

## Edit a Discovery from chat

You don't have to open the Discovery editor to adjust it. Attach the Discovery to the chat first — the editing tools only become available once one is attached — then ask for the change in plain language.

* **Add columns** — *"Add a column for the renewal date."*
* **Delete columns** — *"Drop column 2."*
* **Rewrite a column** — its label, its question, or its answer type: *"Make the 'Notice period' column answer in dates instead of free text."*

Libra applies the change straight away — there is no confirmation step — and any cells the edit creates are queued for calculation automatically, so the affected column refills without you opening the full view. Two behaviours are worth knowing: the editing tools never delete rows, and a document attached to the chat during an edit is appended to the Discovery as a new row.

<div className="libra-buddy-callout">
  <img src="https://mintcdn.com/libra-4206ec93/wgVZXcGnHS4aJk9T/assets/images/libra-buddy/clipboard.png?fit=max&auto=format&n=wgVZXcGnHS4aJk9T&q=85&s=cde036cf23ea2d67cd50f1c295db549a" alt="Libra mascot clipboard" width="725" height="605" data-path="assets/images/libra-buddy/clipboard.png" />

  <div className="libra-buddy-callout-content">
    Editing from chat changes the saved Discovery, not just this conversation. Switching a column's answer type re-extracts that column, so the answers already in it are replaced.
  </div>
</div>

## Reference a finished Discovery in chat

Once a Discovery has finished running, attach it to any chat as context and ask follow-up questions. Only completed Discoveries can be read this way — one still processing won't appear in the picker. Libra answers with citations that point at the Discovery as a whole, or at a specific column, row or cell.

<AccordionGroup>
  <Accordion title="With @-mention while typing">
    Type `@` anywhere in the chat input. The picker opens in sections — **Assistants**, **Documents**, **Discoveries**, **Reviews**, **Playbooks**. **Discoveries** and **Reviews** list the finished items in the current project; **Documents** lists the project's files and folders alongside any Databases you can search. Pick the Discovery from the **Discoveries** section, and it becomes part of the chat's context.
  </Accordion>

  <Accordion title="Via Tools → Add context">
    Click **Tools** in the composer's toolbar row and choose **Add context**. That opens the same picker. Same effect.
  </Accordion>
</AccordionGroup>

<Tip>
  Attaching the project itself, rather than one Discovery, pulls in its ten most recently updated completed Discoveries (and its Reviews and documents) in one go. Useful when you want Libra to consider the whole matter instead of naming each artefact.
</Tip>

### How citations work

When Libra references a Discovery in its answer, the citation points at the most specific part of the table it can.

| Cite level          | Looks like                                | When                                                   |
| ------------------- | ----------------------------------------- | ------------------------------------------------------ |
| **Whole Discovery** | *M\&A Contract Review Discovery*          | When the answer is about the table as a whole.         |
| **Column**          | *Notice Period*                           | When the answer is about the whole column.             |
| **Row**             | *Row 3, Arsenal FC Q4 Signing Agreements* | When the answer is about one specific document.        |
| **Cell**            | *Row 3, Job Title, "Innovation Manager"*  | When the answer is about one specific extracted value. |

Hover a Discovery citation and a popover shows the neighbouring cells as a miniature table with the cited row, column or cell highlighted, so you can check the context without leaving the answer. The popover carries a **Show in Discovery** button; clicking either that or the citation itself opens the Discovery and pops the cited row open at the cited column.

### Reference flow in practice

<Steps>
  <Step title="Open a chat in the right project">
    Discoveries are project-scoped, and the picker only lists the active project's. The chat needs to be in the same project — or attach the project itself.
  </Step>

  <Step title="Type @ and pick the Discovery">
    Completed Discoveries appear under **Discoveries**, sorted by title, each with the Discovery table icon.

    <img src="https://mintcdn.com/libra-4206ec93/DvY4COCBKazHNw7v/assets/images/app/discovery-mention-picker.png?fit=max&auto=format&n=DvY4COCBKazHNw7v&q=85&s=425bfc2dfece79f8bbe3d966f1a31bc7" alt="Chat context picker open, showing Assistants, Documents, Discoveries and Reviews sections with a Discovery listed" width="3800" height="2160" data-path="assets/images/app/discovery-mention-picker.png" />
  </Step>

  <Step title="Ask your question">
    Anything from filter to aggregation to a free-form summary.
  </Step>

  <Step title="Read the answer with its citations">
    Inline citations link into the table. Open the [Cited Sources panel](/en/features/chat/citations) and the Discovery gets a card with the same miniature table preview and an **Open Discovery** button.

    <img src="https://mintcdn.com/libra-4206ec93/DvY4COCBKazHNw7v/assets/images/app/discovery-chat-citations.png?fit=max&auto=format&n=DvY4COCBKazHNw7v&q=85&s=fe7648a4a4dabba45d5bf2c8f17c5943" alt="Chat answer referencing an attached Discovery, with an inline Discovery citation chip and the Cited Sources row beneath the answer" width="3800" height="2160" data-path="assets/images/app/discovery-chat-citations.png" />
  </Step>
</Steps>

## Common chat-on-Discovery prompts

Behind these, Libra either reads a range of rows and columns straight out of the table or hands the question to a data-analysis sub-agent that works over the table as a CSV — which is why aggregations and rankings hold up rather than being eyeballed.

<AccordionGroup>
  <Accordion title="Filter the table">
    *"Which rows have a notice period longer than 90 days?"*

    Libra returns a filtered subset, with citations to the specific cells.
  </Accordion>

  <Accordion title="Sort or rank">
    *"Rank the contracts by contract value, descending. Show the top 10."*
  </Accordion>

  <Accordion title="Aggregate">
    *"What's the average notice period across all rows?"* / *"How many contracts have a non-compete clause?"*
  </Accordion>

  <Accordion title="Compare">
    *"How does the indemnification scope differ between rows 3, 5, and 7?"*
  </Accordion>

  <Accordion title="Draft summaries">
    *"Draft an email summarising the highest-value contracts for the partner. Include counterparties and contract values."*
  </Accordion>

  <Accordion title="Translate">
    *"Translate the high-value rows' counterparty names and contract values into German."*
  </Accordion>
</AccordionGroup>

## Discoveries vs. Reviews as context

Both Discoveries and Reviews can be attached. They cite differently:

|                        | Discovery                                         | Review                                           |
| ---------------------- | ------------------------------------------------- | ------------------------------------------------ |
| **Citation level**     | Whole Discovery, column, row, cell                | Topic, or the whole Review                       |
| **Best for follow-up** | "Which rows have X?" / "What's the average Y?"    | "Why did Topic 3 come back high risk?"           |
| **Best for summary**   | Spreadsheet-shaped summary across many documents. | Redline email or partner briefing on one matter. |

You can attach both at once, for example, a portfolio Discovery and a Review of one of the Discovery's documents. Libra will cite into both.

## Tips for getting useful answers

<AccordionGroup>
  <Accordion title="Attach the documents before sending (creation flow)">
    The Discovery is built from whatever is attached at the moment you send, and nothing else. Attach a document later and it becomes a row only when it is added — with **Add Documents** in the full view, or automatically when you attach it in the same turn you ask Libra for an edit.
  </Accordion>

  <Accordion title="Be specific about what you want">
    *"Summarise this Discovery"* gets generic. *"Summarise the high-value contracts in row 1, 4, and 7, emphasising non-compete duration"* gets something usable.
  </Accordion>

  <Accordion title="Ask for citations back">
    *"And cite the relevant cells"* on any prompt gets you a verifiable answer.
  </Accordion>

  <Accordion title="Stack context if you need it">
    Attach the Discovery and a Review and the underlying documents. Libra can cite into all of them; *"explain why Topic 3 in the Review is medium risk and which Discovery rows are most affected"* is a perfectly usable prompt.
  </Accordion>

  <Accordion title="Don't re-extract data in chat">
    If you find yourself asking *"now extract the notice period for each contract"* in a chat, add a column to the Discovery instead. A column runs the same question over every document and gives you a cell you can cite; a chat answer gives you prose you have to re-check.
  </Accordion>
</AccordionGroup>

## Next steps

<Columns cols={2}>
  <Card title="Create a Discovery (full walkthrough)" icon="play" href="/en/features/discovery/create-discovery">
    The full Discovery editor flow when chat isn't the right starting point.
  </Card>

  <Card title="Citations & sources" icon="quote" href="/en/features/chat/citations">
    How citations work across web sources, documents, Discoveries, and Reviews.
  </Card>
</Columns>
