AI / LlamaIndex Interview Questions
What is a chat engine in LlamaIndex?
A chat engine wraps a query engine with conversation memory, so it can answer follow-up questions that depend on earlier turns, which a plain query engine can't do since it treats every call independently.
You create one with index.as_chat_engine(chat_mode="..."). Common modes include condense_question, which rewrites the latest message into a standalone question using chat history before retrieving; context, which retrieves relevant Nodes for every turn and injects them alongside the conversation; and condense_plus_context, which combines both.
Because it tracks a Memory buffer of prior turns, a chat engine is the right choice for building a conversational assistant over your data, while a query engine is better suited to one-off Q&A or programmatic lookups.
More Related questions...