Launch price: every exam for $29.99 a year, for the first 300 buyers. See the price

CertStreak
Menu

Implement retrieval-augmented generation (RAG) in an application

A worked example

Single answer

An application uses file_search with an existing vector store to answer questions about an expense policy. A developer revises the policy PDF on a local computer. Inspection confirms that the vector store still contains only the previous version. The application must answer from the revised policy while continuing to use the same vector store.

Which change addresses the missing policy updates?

Choose one answer
Why

The revised policy exists only on the developer's computer, so file_search cannot retrieve its changes. Replace the previous indexed file with the revision and complete indexing in the existing vector store before using it for answers.

  • Not correct: Index the revised PDF in a new vector store and configure requests to query that store. This makes the revised policy searchable, but the application must keep using the existing vector store.
  • Correct: Remove the previous indexed file, upload the revised PDF to that vector store, and wait for indexing. The existing vector store can serve the revised policy once the revised file is indexed there. Replacing the previous file and completing indexing makes the revised content available in the required store.
  • Not correct: Update the model instructions to request current answers and continue querying the previous file in the vector store. The source explains that file_search retrieves indexed document content. Instructions requesting current answers do not supply the missing revised content.
  • Not correct: Upload the revised PDF as a file and leave the existing vector store's indexed files as they are. The revised PDF must be indexed in the store that file_search queries before its content can be retrieved.

Practise this topic until it's automatic.

Ten questions a day, every answer explained, and misses that come back until you beat them.

Start free