Authors: Igor Platonov, Backend Engineer, Anton Senkovskiy, Account Manager, and Travis Turner, Tech Editor
Topics: AI, Rails, Open Source, Ruby, LLMs

Our Rails AI assistant had read-only SQL access and could still return peer review scores. Learn how we kept open-ended analytics in an in-app AI assistant while making database access honor application permissions.

Our internal Rails app has an AI assistant with read-only SQL access to the database. But when asked for active peer review assignments, it returned written feedback, scores, and a column of reviewer names the question never mentioned. Read-only protected data from being changed, but it told us nothing about who was allowed to read it. Thus, we moved the boundary out of the prompt and into Action Policy, without giving up the open-ended analytics that made the assistant worth building. This post shows how, and the lessons here have wide applicability, so read on!

Read more