Create

Sign in to ReadmeX

or

How we handle your data: Privacy Policy

ReadmeX

Your AI reading companion

What would you like to catch up on?

Pick a briefing, or ask your own question.

Your community and people briefings stay personal to you.

Story

NESBox builds multilingual RAG search and Q&A on a single Cloudflare Worker

AI summary

NESBox developer mantou132 detailed an implementation that combines Workers, Workers AI, Vectorize and KV for multilingual embeddings, BM25 retrieval, caching and streaming RAG answers. The single Worker exposes synchronization, update, search and completion endpoints for a library of more than 100 retro games, with answers generated in the user’s interface language. A 12-query test found no ranking improvement from optional reranking, so the author left it disabled by default.

In-depth insight

The documented architecture shows how one developer combined Cloudflare’s managed AI, vector and storage services into a compact multilingual RAG implementation without a separate server or vector database.

不需要服务器,也不需要单独的向量数据库:Workers + Workers AI + Vectorize + KV,一个 Worker 文件就实现了入库、混合检索和流式问答。

做了什么

NESBox 是我做的一个复古游戏在线联机平台。游戏库里有一百多款游戏,简介中文、英文、日文都有。用户常常记不住游戏名,只记得"那个骑摩托越野的"、"两个人一起打的格斗游戏"。

所以我给它加了两个 AI 功能,都放在全局搜索框(⌘K)里:

  • 语义搜索:用自然语言描述来找游戏,结果和本地按名称、拼音匹配的结果合并显示。
  • AI 问答:输入 ? 开头的问题,本地帮助条目都没匹配上时,基于游戏库流式生成回答,用用户当前的界面语言回复。

后端是一个 Cloudflare Worker,提供四个接口:

#NESBox#Cloudflare#Cloudflare Workers#Cloudflare Workers AI#Cloudflare Vectorize#Cloudflare KV#bge-m3#bge-reranker-base#Nemotron 3 120B#Gem

Original · 8 min readRead the original
Group chat

No comments yet. Start the conversation.