The raw movie records are not handed directly to the LLM. They first become Documents, then TextNodes. VectorStoreIndex triggers embedding generation, while StorageContext connects the indexing process to PGVectorStore. The result is persisted in PostgreSQL + pgvector.
When a user asks a question, QueryEngine embeds the query, uses pgvector to find the closest TextNodes, and sends those retrieved contexts to the LLM for answer generation.