BUILD YOUR FIRST RAG APP FOR FREE

You need Node.js 18 or newer and a free Gemini API key from Google AI Studio.

1. Unzip the starter, or put rag.mjs, knowledge.txt, and package.json together.
2. Open that folder in a terminal.
3. Run: npm install
4. macOS/Linux:
   GEMINI_API_KEY="your-key" node rag.mjs "When can I borrow a laptop?"
5. Windows PowerShell:
   $env:GEMINI_API_KEY="your-key"
   node rag.mjs "When can I borrow a laptop?"

Replace knowledge.txt with your own notes or FAQ when the sample works.
Never put an API key in browser code or commit it to GitHub.
The free Gemini tier has usage limits and Google says free-tier inputs may be
used to improve its products. Do not upload private or sensitive information.

To change the project with free AI, open Google AI Studio, attach rag.mjs, and
paste this prompt:

I have a working beginner RAG script. Help me change it into a RAG assistant
for [describe my users and information]. Keep Gemini's free-tier models, do not
add a paid vector database, never put the API key in browser code, and make one
small change at a time. First explain the change, then show the exact code.
