WhoBuilt

Building Reactive AI Apps

Nov 9, 2023· 17 min· 5.3K views·Watch on YouTube

Speaker

At an AI Engineer event, Fixie founder Matt Welsh presents AI.JSX, an open-source TypeScript framework for building reactive AI applications.

Making AI app development easier

Welsh says building high-quality LLM apps requires developers to manage vector databases, context limits, retrieval, and tools. Fixie built AI.JSX to make those tasks more accessible, especially for JavaScript and full-stack developers.

Composing prompts with components

Welsh introduces AI.JSX as a React-like way to build LLM applications in TypeScript, with support for OpenAI and Anthropic, React integration, retrieval, and custom tools. Components form a tree that renders asynchronously, allowing several LLM calls to run and stream in parallel, such as generating a story's character, setting, and plot.

Adding tools, retrieval, and UI

Welsh demonstrates wrapping a component in a KidsSafe component that rewrites its output, and giving an LLM access to a tool that calls GitHub's GraphQL API. A DocsQA component retrieves relevant document chunks for a prompt, while a Fixie embed can add a chat interface, session management, and Markdown rendering to a React app.

Hosting apps and enabling voice

Welsh describes Fixie's cloud service for hosting AI.JSX apps, managing document ingestion and conversational state, and connecting to popular LLMs. He also demonstrates a real-time voice agent for a fictional donut shop: it takes an order, answers a menu question, and redirects an unrelated question about LLMs.

Takeaways

  • Use component composition to organize prompts and reuse behavior across an LLM app.
  • Parallel streaming calls can combine generated character, setting, and plot into one story.
  • Retrieval can be expressed as a component that supplies relevant document chunks to a prompt.
  • Connect tools through described functions so an LLM app can call services such as GitHub's API.
  • Voice agents can combine order-taking with domain-specific responses and redirection.

Mentioned in this talk

Search inside this talk

What was claimed 14

Show all 14 facts

Related talks