Ask Policies
Can I expense a monitor for working from home?
Asked by Ana Silva · 10:42
- Answer
- Yes, up to $300 once every three years, with manager approval.
- Source 1
- Remote Work Equipment Policy, section 2
- Source 2
- Expense Policy, home office items
- Confidence
- Two matching passages
Agent run
- 10:42 Read the question Agent
- 10:42 search_knowledge returned 5 passages from Pinecone Agent
- 10:42 Answered from 2 passages and cited both Agent
What matters here
- A Tray Helix agent can answer from company knowledge by calling a vector store such as Pinecone as a tool.
- The vector store holds your knowledge, and the agent reaches it through a tool like any other, with the same limits and logs.
- Citing the passage behind each answer lets the reader check it in one click.
- An agent that says "I couldn't find that" is more useful than one that guesses, so make not-found an answer.
- A Tray workflow can keep the index current as documents change, so answers don't go stale.
Who this is for
You run HR or people operations, or you own a knowledge base, a policy library or product documentation, and people keep asking questions the documents already answer. You want answers that cite the source, not a chatbot that improvises.
How it works in practice
From a question to an answer someone can check.
- 1
Someone asks a question
In the app, or in Slack or Teams through a Tray workflow.
- 2
The agent searches
It calls search_knowledge, which queries the vector store for the passages closest to the question.
- 3
It answers from what it found
Only from the passages that came back, with a citation on each claim.
- 4
Or it says it couldn't find it
If nothing relevant comes back, it says so and suggests who to ask.
- 5
The index stays current
A Tray workflow updates the vector store when a document is added, changed or removed.
What a knowledge agent is made of
An index, one search tool, and a rule about what the agent may say.
An index of your documents
Passages from your sources, embedded and stored in a vector store such as Pinecone, each with its title and link.
A search tool
search_knowledge takes the question and returns the closest passages with their sources. Read only.
An answer rule
Answer only from returned passages, cite each one, and say when nothing relevant was found.
A sync
A Tray workflow that adds, updates and removes passages as the source documents change.
The prompts
Paste these into Claude Code, Codex or Cursor in order. Each one leaves you with something that runs, so you can stop after any step.
These prompts start from a Helix project, which is what handles sign-in, credentials and hosting. Start with Helix.
The ask app
Questions, answers and their sources.
Create a Helix app: a company knowledge agent people can ask about our policies.
Store each question with who asked, the answer, the passages cited (title, link and the passage text) and whether the asker marked it helpful.
Show an ask box, the answer with numbered citations that open the source, and a history of past questions people can search.
The agent and its search tool
Search first, answer from what came back.
Add an agent to the app that answers questions from our documents.
Give it one tool, search_knowledge. It embeds the question the same way our index was built, queries our Pinecone index, and returns the top passages with their title, link and text.
The agent always searches before it answers. It answers only from the passages that came back and cites each one. If none of them answer the question, it says it could not find it and suggests the owner of the nearest policy.
Learn from the questions
See where the documents fall short.
Add a view for the policy owners: the most asked questions, questions the agent could not answer, and answers marked not helpful, grouped by source document.
Unanswered questions are the to-do list for the documents, not the agent.
Connect it to real systems
Your index, your sources.
Now connect it to the systems we actually run.
Anything in angle brackets is a placeholder. Swap it for whatever we use.
<Pinecone>. Query our policies index from search_knowledge. Read only.
Our <Confluence> spaces and <Google Drive> folders are kept in the index by a Tray workflow, so this app never writes to the index.
Ship it
A URL, and the company on it.
Deploy my app.
What it connects to
The agent reads the vector store. The sources feed it through a workflow.
-
Pinecone Search the index of your documents for passages that match the question. Reads -
Confluence The source documents, kept in the index by a Tray workflow. Reads -
Google Drive Policies and documents, kept in the index the same way. Reads
-
Slack Where people ask, through a Tray workflow that calls the agent. Reads and writes
Named systems are the ones most teams actually run, not a list of the only ones that work. Swap in whatever you use.
Running it for real
The build gets you a working agent. Running it means the right people can ask, the key stays out of the code, and every answer is on record.
- 1
Deploy the app and its agent together
One command, or Deploy from CI on every merge, takes the app to a live URL. The agent ships with its app, so you can roll back any deployment.
- 2
Sign-in that matches the documents
SSO and access control decide who can ask, so the people asking are the people allowed to read what is indexed.
- 3
Credentials held by Tray
The vector store key is held in Tray, not in the code, so it can be rotated without a redeploy.
- 4
A named owner and every step logged
The app and its agent have a named owner. Every search and answer is logged, and Tray streams the logs to your SIEM.
- 5
Know what each answer costs
AI usage shows per app, so the cost of answering is visible next to the questions it answered.