Skip to content
Skip to content

Practical LLM operations guide · By Yes AI

Where does a RAG system keep copies of your data?

Published 5 min read

A retrieval-augmented assistant does more than read your documents in place. It extracts text, splits it into chunks, stores embeddings and often logs questions and answers that quote the source. Security questionnaires and privacy assessments ask where all of that lives, and this guide gives you a method to answer.

Quick answer

A typical RAG system can hold your content in up to seven places: the source system, a sync cache or staging store, extracted text and chunks, the vector index with its embeddings, conversation history, application and provider logs, and backups of each. Every copy needs a location, an access list, a retention period and a deletion path. Embeddings count as copies: in one peer-reviewed study, researchers recovered 92% of short text inputs exactly from their embeddings.

Two IT staff in a Melbourne server room checking storage equipment, with a laptop on a trolley

Why does a RAG system copy your documents?

To answer quickly, the system cannot open every source file at question time. It reads documents ahead of time, extracts the text, splits it into chunks, converts each chunk into an embedding and stores both in an index. When someone asks a question, the closest chunks are retrieved and sent to the model with the question. Each step creates a copy in a new place, sometimes with a different owner, location and retention period. Some products avoid one of these copies: Microsoft says the Azure OpenAI 'on your data' feature leaves data in the data source and location you designate and does not create a duplicate data store. Ask each vendor which copies its design creates.

Are embeddings sensitive?

Embeddings look like long lists of numbers, which can make them seem harmless. Published research shows they can reveal the original text. A 2023 paper at EMNLP, a peer-reviewed natural language processing conference, described a method that recovered 92% of 32-token text inputs exactly from their embeddings, and it recovered full names from embeddings of clinical notes. Treat a vector store with the same classification as the documents it was built from: the same access controls, the same location rules and the same deletion obligations.

Which copies does a typical system create?

Walk through the pipeline from the source system to the answer on screen and list every place content lands, including places outside the main application such as monitoring tools. Your design may add or remove copies, and products differ, so confirm each one with whoever built or supplies it. The list below covers the copies that appear most often. Record each one in your data flow, with the team or supplier responsible for it.

  • Sync cache or staging store: raw files pulled from SharePoint, file shares or other systems.
  • Extracted text and chunks: plain text, often with metadata such as title, author and permissions.
  • Vector index: embeddings plus the chunk text returned at query time.
  • Conversation history: questions and answers, which quote retrieved passages.
  • Logs: application logs, provider abuse-monitoring logs and observability tools.
  • Backups and exports: snapshots of each store above, and evaluation datasets built from real questions.

Where do provider logs and stored conversations sit?

Hosted model providers may keep prompts, which include the retrieved chunks, for a period. OpenAI says its abuse monitoring logs may contain prompts and responses and are retained for up to 30 days by default, unless longer retention is required by law, and eligible customers can be approved for controls that exclude their content. Microsoft says some Azure features, such as the Responses API, Assistants threads and stored completions, store data in your resource within the same geography until you delete it. These copies sit outside your vector store, so a deletion process that only touches the index will miss them.

How do you delete a document from every copy?

Deletion needs to flow downstream automatically. When a source document is deleted or withdrawn, the sync should remove its chunks and embeddings from the index, and the system should record when that happened. Conversation history and logs that quoted the document are harder: decide whether they are kept for audit or purged on a schedule, and write that into your retention policy. For personal information, APP 11 requires covered organisations to take reasonable steps to destroy or de-identify information they no longer need, so check whether your indexes and logs keep it beyond that point. Our guide on removing retired documents covers retrieval withdrawal in detail.

How do you present this to a security reviewer?

Produce a one-page data flow: source systems on the left, each copy in the middle, and the model and users on the right. For each copy, record the location (country and service), who can access it, the retention period, encryption and how deletion reaches it. Attach provider statements for the hosted parts. This page covers many of the data-handling questions in a vendor security questionnaire and gives your privacy officer the inputs for an assessment. Hypothetical example: a system with three source collections, one vector index, conversation history kept for 90 days and provider logs kept for 30 days would show each of those stores with its own retention line; the figures are illustrative.

Copy register for a RAG assistant (template)

CopyTypical locationContainsDeletion trigger
Source systemSharePoint, file server or document management systemOriginal documentsRecords retention schedule
Sync cache or stagingStorage used by the ingestion pipelineRaw file copiesAfter indexing, or on source deletion
Chunks and extracted textSearch service or databaseText plus metadata and permissionsSource deletion or withdrawal
Vector indexVector database or search serviceEmbeddings and chunk textSource deletion or withdrawal
Conversation historyApplication database or provider featureQuestions, answers and quoted passagesThe retention period you set
LogsApplication, provider and monitoring toolsPrompts, retrieved text and metadataLog retention period and provider terms
Backups and test setsBackup storage and evaluation filesSnapshots and real questionsBackup cycle and test set review

Practical checklist

  • Every copy in the pipeline is listed with its location, access, retention, encryption and deletion path.
  • The vector index carries the same classification and access controls as its source documents.
  • Source deletions propagate to chunks and embeddings, with a record of when.
  • Provider log retention and stored-conversation features are known for each hosted service.
  • Conversation history and log retention periods are set and written into policy.
  • Backups and evaluation datasets are included in the deletion process.

Common questions

Does encrypting the vector store make embeddings safe?

Encryption at rest protects the stored files from someone who obtains a disk or backup. It does not stop anyone with query access to the index from retrieving chunks. Control who and what can query the vector store, keep it in the same security zone as its sources, and treat its contents as being as sensitive as the documents.

Do we need to store chunk text, or only embeddings?

Most designs store the chunk text with the embedding, because the model needs the text to answer and the user needs it for citations. Storing only embeddings and fetching text from the source at query time is possible but slower and more complex, and the embeddings themselves remain sensitive.

Is redacting documents before indexing worth it?

For collections where staff need the procedure but not the personal details, it reduces what every downstream copy holds. Check redaction quality on a sample, since automated redaction can miss names and identifiers, and keep the redaction rules with the index so a rebuild applies them again.

How does on-premises hosting change the picture?

It moves provider-side copies, such as abuse-monitoring logs, into infrastructure you control, and it lets you choose where every store sits. The number of copies stays about the same. You still need the register, retention settings and deletion paths, because the copies now sit with your own administrators.

Sources and further reading

Continue planning

Plan the checks before your next LLM release

Describe the task, source documents and people who will review the answers. We can discuss evaluation, access boundaries and a staged implementation. Keep confidential documents and access credentials out of this enquiry.