Chapter 1

AI Foundations

How poqpoq World builds companions that reason, remember, and perceive — at scale, in real time.

The Problem

For twenty years, virtual worlds have been experientially empty. Artists filled them with architecture and landscapes, but the characters do not think, the spaces do not respond, and the result feels more like wandering through a museum after hours than inhabiting a living world.

poqpoq World takes an AI-first approach. Rather than building a world and hoping people fill it, we built a platform where the world itself is alive with intelligence. Every companion reasons about your relationship, remembers your conversations, and perceives the space around them just as you do.

The Challenge

Creating a single intelligent companion is straightforward when you can throw unlimited compute at one conversation. The difficulty emerges at scale: hundreds of concurrent users, each with unique relationships, conversation histories, and spatial context.

100+ Concurrent Users
< 2s Target Response
30/min Perception Updates
70% Compute Reduction

Without careful engineering, a naive implementation demands massive infrastructure and still delivers sluggish responses. Our companions achieve sub-two-second response times, efficient memory retrieval, and intelligent spatial filtering — while maintaining rich, personalized relationships with every user.

Five Core Principles

The companion system is built on five principles that work together to make real-time, personalized AI possible at scale.

1

Semantic Memory Over Keyword Storage

Conversations are encoded into 768-dimensional vectors that capture meaning, not just words. When a companion searches for relevant memories, it finds semantically similar experiences. A question about "weather" retrieves memories about sunny days, climate, and forecasts — concepts that keyword search would miss entirely.

2

Significance-Based Filtering

Not all memories carry equal weight. Each is automatically scored on a 0.0 to 1.0 scale based on emotional weight and commitment language. A casual "hmm" scores 0.1; "I promise to help you" scores 0.9. Companions prioritize what truly matters in your relationship.

3

Attention-Driven Perception

Human attention is not constant — we focus intensely during important moments, then relax into background awareness. Companions mirror this with three attention levels: high urgency (5-second updates when you speak), active (12-second updates during interaction), and baseline (120-second updates when idle). This biological model reduces unnecessary computation by 70%.

4

Hybrid Retrieval

Memory search combines two strategies: vector similarity at 70% weight finds semantically related memories through approximate nearest-neighbor search, while keyword matching at 30% weight ensures exact terms are never missed. The combination delivers both broad understanding and precise factual recall.

5

Large Model, Small Context

A capable language model with a carefully curated ~2,000-token context window outperforms a smaller model drowning in massive, noisy input. Think of it this way: a master chef creates a memorable meal from five perfect ingredients, while a novice struggles even with a fully stocked pantry. Quality of context matters more than quantity.

Architecture Overview

The companion system operates across three layers, rendered in real time by Babylon.js with WebGPU acceleration. Optimization happens at every stage — from the moment a character is typed to the final token streaming back to the screen.

Frontend Layer
Chat UI
Predictive Caching
Spatial Awareness
Real-Time Communication
API Layer
Embedding Generation
Memory Retrieval
Streaming Responses
Storage Layer
PostgreSQL
FAISS Vector Index
Language Model

Reading Guide

This documentation is structured as a technical narrative. Each chapter builds on the previous ones.

Chapter 2 Memory and embeddings architecture — how companions store, retrieve, and prioritize conversational history.
Chapter 3 Attention and perception systems — how companions sense and filter spatial information using adaptive update rates.
Chapter 4 Model philosophy — why a large model with small, curated context outperforms the alternatives.
Chapter 5 FAISS optimization — the technical infrastructure behind sub-second semantic memory search.
Chapter 6 Identity and personality — maintaining consistent companion character across unpredictable conversations.
Chapter 7 Knowledge seeding — bootstrapping companion world knowledge through retrieval-augmented generation.
Chapter 8 Tool use and agency — teaching companions to act on the world, not just talk about it.