MnemoMind: Chat with Your Documents & Internet
MnemoMind is a powerful demonstration of Retrieval-Augmented Generation (RAG) using the Google Gemini API's FileSearch tool. Simply upload any text-based documentβfrom dense product manuals to lengthy reportsβand start a conversation. MnemoMind intelligently searches your documents to provide precise, context-aware answers.
The application also features a seamless integration with GoogleSearch, allowing you to switch from querying your private documents to asking questions about the world, with answers grounded in up-to-date web results.

β¨ Features
- Document Upload: Supports PDF, TXT, and Markdown files.
- Sample Documents: Instantly start chatting with pre-loaded examples (Hyundai i10 & LG Washer manuals).
- File-Based Chat: Leverages the
FileSearchtool to perform RAG on your uploaded content. - Web-Based Chat: Switch to
GoogleSearchfor real-time, web-grounded answers. - Source Citing:
- FileSearch: View the exact text chunks from your document that were used to generate the answer.
- GoogleSearch: Get direct links to the web pages that sourced the information.
- Dynamic Suggestions: Automatically generates relevant example questions based on your document's content to help you get started.
- Clean & Responsive UI: A modern, intuitive chat interface built for a seamless user experience.
- Automatic Cleanup: All uploaded documents and their indexes are automatically deleted when you end the chat or close the browser tab, ensuring privacy and cost-efficiency.
π Core Technologies
AI & Backend:
- Google Gemini API (
@google/genai): The core of the application. -
FileSearchTool: Manages document chunking, embedding, indexing, and retrieval for the RAG pipeline. -
GoogleSearchTool: Provides web search capabilities for grounded, up-to-date answers.
- Google Gemini API (
Frontend:
- React: A JavaScript library for building user interfaces.
- TypeScript: For static typing and improved developer experience.
- Tailwind CSS: A utility-first CSS framework for rapid UI development.
βοΈ How It Works: The RAG Pipeline
MnemoMind provides a simplified and powerful RAG experience by abstracting away the complexities of the pipeline.
- Ephemeral Index Creation: When you upload documents, the app creates a temporary
FileSearchStorevia the Gemini API. This store acts as a private, short-term index for your chat session. - Document Processing: The files are uploaded to this store. The
FileSearchservice automatically handles:- Chunking: Breaking the documents into smaller, semantically meaningful pieces.
- Embedding: Converting each chunk into a numerical vector that captures its meaning.
- Indexing: Storing these vectors in a way that allows for efficient similarity searching.
- Querying: When you ask a question:
- Your query is sent to the Gemini model with the
FileSearchtool configured to use your session's store. - The tool performs a vector search to find the most relevant document chunks related to your question.
- Your query is sent to the Gemini model with the
- Augmented Generation: The model receives your question plus the relevant chunks as context. It uses this augmented information to generate a highly accurate and relevant answer.
- Session Teardown: The
FileSearchStoreis automatically deleted when you click "New Chat" or close the browser, ensuring your data is not persisted.
π Project Structure
.
βββ public/
β βββ index.css # Custom CSS styles (scrollbar, settings menu)
βββ src/
β βββ components/ # Reusable React components
β β βββ ChatInterface.tsx # The main chat UI
β β βββ UploadModal.tsx # File upload and sample selection modal
β β βββ icons/ # SVG icon components
β β βββ ... # Other UI components
β βββ services/
β β βββ geminiService.ts # All communication with the Gemini API
β βββ App.tsx # Main application component, state management
β βββ index.tsx # Application entry point
β βββ types.ts # TypeScript type definitions
βββ index.html # Main HTML file with Tailwind CSS config
βββ metadata.json # Application metadata
βββ README.md # You are here!
βοΈ License
This project is licensed under the MIT License. See the LICENSE file for details.
Built With
- filesearchtool
- gemini
- react
- typescript
Log in or sign up for Devpost to join the conversation.