Answer Engine TemplatePro
Ask, retrieve, answer, suggest: sources on the stream before the first token, citations that slice the original document by offset, and follow-up questions from a second call.
Ask the Halyard docs
Answers come only from the bundled corpus. Every claim carries a citation you can open — the passage it came from, not a list of filenames.
A scripted replay of one question — the source cards, retrieval rail, citation chips and composer above are the real components the template ships, mounted here, but there is no corpus or model behind this page. The ordering is the feature: sources land before the first answer token, citations resolve inline as the answer streams past them, and the follow-up chips arrive only after the last token. The template you download talks to your corpus and your gateway key.
Every file in it
The full file list, with line counts — nothing is hidden about what you are getting, only the contents are.
42 files, 3,312 lines
Every file below is real and readable once you have Pro — downloaded as a zip, installed with one shadcn command, or read here in the browser. $49 once, for this and every other Pro item.
Built on these components
All free, all documented on their own pages. The template is what wires them together.
A cited source as a card — favicon, page title, domain, and the snippet the answer actually drew from.
Source ListThe passages retrieval actually returned, with similarity scores and a visible relevance floor — including the case where nothing cleared it.
Citation PopoverA citation marker that shows the passage it came from — fixed positioning that survives a scrolling answer, touch and keyboard, and an honest state for a number the model invented.
Prompt InputThe message input at the heart of an AI chat app — file attachments, model picker, tool toggles, voice, and a send button that turns into stop.
Running it
- Download the zip and unpack it, or install it with the shadcn command above — either way the app lands in its own directory. Then
npm install. - Add an
AI_GATEWAY_API_KEYto.env.local— one key reaches every model the template uses. npm run dev. To use a provider directly instead, install its package and change one line in the chat route.