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

# Update a Document and Keep Older Answers Accurate

> Add a newer version of your document to Elephas by adding the same file again. Earlier answers keep citing the exact version they used, so history stays true.

To update a document, add the changed file to the same Brain again, from the same place on your computer. Elephas adds it as a new version of the existing document, and answers you got earlier keep citing the exact version they used.

## Before you start

* Save your changes to the original file, in the same folder and with the same name you added it from.
* Open the Brain the document is in. Updating works per Brain.

## Steps

<Steps>
  <Step title="Open the Brain">
    Click the Brain in the sidebar, or open it from the **Brains** page.
  </Step>

  <Step title="Add the file again">
    Drag the updated file onto the Brain's page, or click **Add › Files…** (⌘O on Mac, Ctrl+O on Windows) and pick it. If you originally added a whole folder, you can add the folder again: changed files get new versions, and new files are added.
  </Step>

  <Step title="Let it get ready">
    The document's row shows its progress while the new version is read and indexed. Until it finishes, Ask keeps using the current version, so the document never drops out of your answers.
  </Step>
</Steps>

For a web page, add the same address again with **Add › Web Page…**. If the page changed, it becomes a new version. See [add web pages](/docs/brains-and-documents/add-web-pages).

## How it works

### Elephas matches by where the file came from

Elephas remembers where each file was added from.

| You add | What happens |
| - | - |
| The same file from the same place, changed | A new version of the existing document |
| The same file from the same place, unchanged | Nothing. The document stays as it is. |
| A file from a different place or with a different name, with different content | A new, separate document |
| A file with exactly the same content as one already in the Brain | Linked to the existing document. Nothing is indexed twice. |

If you saved the new version under a new name or in another folder, Elephas treats it as a separate document. Add it, then [remove](/docs/brains-and-documents/remove-documents) the old one if you no longer want it in your answers.

### Older answers stay accurate

Each version is kept as its own fixed copy. Nothing is edited in place.

* **New questions** search only the newest version.
* **Earlier answers** keep citing the version they were written from. Elephas keeps that version's text for them, so an old citation shows the passage as it was when the answer was given, even if that paragraph has since changed. If a passage can no longer be shown, the citation says **Support passage changed or is unavailable** rather than pointing at different text.

That way a chat about last month's draft of a contract still shows what last month's draft said.

### If the new version fails

If the new version cannot be read, Elephas discards it and keeps the current version. Your document stays ready to ask, and nothing in your earlier answers changes.

### Elephas does not watch your files

Elephas reads a file when you add it and never checks the original again on its own. Editing the original does not change your Brain until you add it again.

## Troubleshooting

<AccordionGroup>
  <Accordion title="I added the new version but got a second document">
    The file was added from a different folder or with a different name. Remove the old document from the Brain. See [remove documents](/docs/brains-and-documents/remove-documents).
  </Accordion>

  <Accordion title="Nothing happened when I added the file again">
    The file has not changed since you last added it. Check that you saved your changes to the original file.
  </Accordion>

  <Accordion title="Elephas says the new version could not be added">
    The new version could not be read, so Elephas kept the previous one. Your document is still ready to ask. Read the reason Elephas gives and see [file import errors](/docs/troubleshooting/file-import-errors).
  </Accordion>
</AccordionGroup>

## Related articles

<CardGroup cols={2}>
  <Card title="Citations and sources" href="/docs/ask/citations-and-sources" />

  <Card title="Remove documents" href="/docs/brains-and-documents/remove-documents" />

  <Card title="Add files and folders" href="/docs/brains-and-documents/add-files-and-folders" />

  <Card title="Add web pages" href="/docs/brains-and-documents/add-web-pages" />
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.