PitchHut logo
A local-first AI memory engine for personal computer files.
Pitch

Laptop AI transforms personal computing by allowing users to query their local files with AI-driven insights. This local-first memory engine indexes selected folders using custom disk-backed databases and retrieves source-cited answers, all while keeping data private and secure.

Description

Laptop AI: A Personal AI Memory Infrastructure for Your Computer

Laptop AI is a cutting-edge, local-first AI memory engine designed to enhance productivity by allowing users to query information about files stored on their computer. This project enables the creation of a personalized and secure environment where AI can assist with data retrieval, ensuring privacy and source citation through its custom disk-backed vector database.

Key Features

  • Local File Indexing: Laptop AI indexes designated folders, enabling users to fetch relevant information efficiently.
  • Private and Secure: The system is built with a strong focus on security, featuring an architecture that ensures only user-selected folders are indexed, while sensitive files remain protected.
  • Easy Querying: Users can seamlessly retrieve context-specific answers to their questions about their documents, ensuring access to relevant information when it’s needed.

Usage Example

The functionality can be easily demonstrated with the following command sequences:

./laptop-ai init
./laptop-ai index ./examples/notes
./laptop-ai ask "what controls movement in my biology notes?"

This would yield a structured response that includes both the answer and the sources from which it was derived:

Answer:
Your biology notes say that the basal ganglia helps control movement. The
direct pathway promotes movement, while the indirect pathway suppresses movement.

Sources:
1. examples/notes/biology.md

Architecture Overview

Laptop AI operates through a well-defined architecture that processes input as follows:

flowchart LR
  A[Selected folder] --> B[Allowlist, denylist, secret scan]
  B --> C[Text extraction]
  C --> D[Chunker]
  D --> E[Local embeddings: nomic-embed-text]
  E --> F[Custom vector DB]
  F --> G[Cosine top-k search]
  G --> H[Prompt with untrusted context]
  H --> I[Local LLM: llama3]
  I --> J[Answer + sources]

Security and Threat Management

The system has a robust security model, defaulting to a local-only operation that seeks to minimize risks associated with data breaches. Key measures include:

  • Content Scanning: A built-in scanner checks for sensitive information during indexing.
  • Allowlist Feature: Only selected folders are indexed to prevent unwanted data exposure.
  • Handling of Symlinks: Symlinks are skipped by default to protect against data leaking beyond the intended scope.

Performance Benchmarks

Recent performance tests highlight the efficiency of Laptop AI:

  • Insert operation averages at 92,224 ns/op.
  • Searching through 100,000 records takes about 15,404,674 ns/op.

Future Development Plans

The project will continue to evolve, focusing on:

  • Implementing encrypted vector storage for enhanced data security.
  • Developing additional commands like search, sources, forget, and doctor to improve functionality.

Laptop AI represents a significant advancement in how personal computers can utilize local AI for memory and knowledge management, paving the way for more secure and private interactions with technology.

0 comments

No comments yet.

Sign in to be the first to comment.