Company
Date Published
Author
Ornella Altunyan
Word count
1143
Language
English
Hacker News points
None

Summary

Building a Retrieval Augmented Generation (RAG) app with MongoDB Atlas, Braintrust simplifies the workflow of iterating on RAG applications by pushing the retrieval tool from the codebase to the UI, allowing users to experiment with different prompts and models side-by-side. The application is defined as two components: a system prompt containing instructions for retrieving content and synthesizing answers, and a vector search tool implemented in TypeScript that embeds a query, searches for relevant documents, and returns them. To get started, users need to create a new cluster in their Atlas account, upload vectors from the Braintrust documentation, define the retrieval tool, push it to Braintrust, and then use the UI to try out the tool and tweak the prompt to improve results. The playground provides an interactive environment for testing out the prompt and tool call, allowing users to evaluate the results using a custom scorer and create a more detailed analysis by running full experiments.