Skip to main content

Choose a read-only database view for your Agent

LoopReply Team3 min read
databaseknowledgedata-checks

Choose a read-only result that contains only the approved information your Agent needs, then decide whether a saved, indexed dataset is suitable for the questions visitors will ask. Do not assume a database connection means each question checks the database live. For background on data sources, see the knowledge base guide and how to train an AI chatbot on your own data.

Define the answer before choosing the data

Write down one visitor question and the smallest set of information needed to answer it. For a public product catalogue, that might be product code, name, and category. Leave out fields that do not help answer the question.

LoopReply’s database connector supports PostgreSQL and MySQL with a validated, read-only SELECT query. That describes the connector, not a promise that every visitor question checks a live database. A synced knowledge dataset is not proof of a live database lookup for each question.

As a planning step, ask the person responsible for the source to prepare a read-only result containing only the fields approved for public answers. Keep account-specific or otherwise restricted information outside a public-answer source. If your questions need current values from a business system, confirm separately whether an indexed dataset meets that need.

Decide whether saved rows are enough

A saved dataset can suit questions about a stable catalogue or reference list. It may not suit a question whose answer must reflect a recent change. Write down which source the Agent will use and when your team last checked that source. Treat this as your own review record, not as an automatic refresh schedule.

For supported indexed spreadsheet and database datasets, filtering, sorting, counting, and aggregation use the complete saved rows. If row coverage is incomplete, the system rejects an exact total instead of returning one calculated from partial data. For another practical check on structured data, see four checks before your AI Agent answers from a spreadsheet.

Try one illustrative reference question

Illustrative example, not an observed result: Imagine the approved catalogue contains these three complete rows:

Product codeProduct nameCategory
P-101Desk lampLighting
P-102Clamp lampLighting
P-103Storage shelfStorage

Ask: “How many products are in Lighting?” The expected answer is two, provided these are the complete saved rows and the source has finished processing. If your real source has more rows, include them in the test rather than treating this small example as evidence about your own dataset.

An attached file is not ready for answers simply because it was uploaded. Its contents must finish processing before they can be used. Check processing readiness before judging the answer, then compare the response with the source. The spreadsheet checks guide offers more examples of questions with known answers.

Keep the review focused

Before relying on the result, answer three questions: Does it contain only information approved for visitors? Are its saved rows complete for the question you tested? Is a saved dataset fresh enough for the answer you intend to give? If any answer is unclear, narrow the question or resolve the source issue before using that result for visitor responses.

Ready to build your AI chatbot?

Start for free with LoopReply's visual workflow builder. No credit card required.

Data handling

Read how LoopReply handles personal data and how to contact us about it.

Terms of service

Review the terms that apply to your account and use of the platform.

Knowledge sources

Learn how to prepare, process, and check the information your Agent uses.

Contact us