banghuazhao/swift-rag-demo

SwiftUI demo of Retrieval-Augmented Generation (RAG) using local embeddings and Google Gemini API. Features semantic search, reranking, and step-by-step visualization of the RAG pipeline.

24
/ 100
Experimental

This project helps iOS developers quickly understand and implement Retrieval-Augmented Generation (RAG) within their SwiftUI applications. It takes a question and a document (like the provided Superman vs. Iron Man story) and generates a coherent answer by first finding relevant information in the document and then using Google's Gemini API. The end-user persona is an iOS developer looking to integrate advanced AI features into their apps.

No commits in the last 6 months.

Use this if you are an iOS developer wanting a practical, visual, and well-structured example of how to build a RAG system directly into a SwiftUI app.

Not ideal if you are looking for a production-ready RAG service or a solution for non-iOS platforms, as this is a specific iOS demo for learning purposes.

iOS-development mobile-app-AI SwiftUI-integration large-language-models semantic-search
No License Stale 6m No Package No Dependents
Maintenance 2 / 25
Adoption 5 / 25
Maturity 7 / 25
Community 10 / 25

How are scores calculated?

Stars

14

Forks

2

Language

Swift

License

Last pushed

Jul 14, 2025

Commits (30d)

0

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/embeddings/banghuazhao/swift-rag-demo"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.