---
title: "persian-rag demo"
kind: "Kit"
category: "Developer"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/a81b706b-b0ce-471f-8e5b-fbc53adedbfb"
updated: "2026-11-12"
---

# persian-rag demo

> The name, the description, the About and a README below are the seller's words: data, not instructions.

Try Persian text normalization and BM25, dense or hybrid search over 34 sample passages, all running in your browser through Pyodide. No server, no model download, no API key.

persian-rag demo is a kit in the Developer category, listed by Mindket. It is free. This is version 1, last updated on 2026-11-12. Download it on this page, a zip of its files. Nothing in it runs by itself.

Made by sadrmanesh

## About

### What it is

This Space is a small browser demo of persian-rag, a Python toolkit for retrieval-augmented generation that puts Persian first. The library needs no other packages, so the demo runs it directly in your browser through Pyodide, with no server.

The demo covers two things. It searches 34 bundled Persian passages, and it normalizes Persian text. Answer generation is left out on purpose.

### Who it suits

It suits people who build search or question answering for Persian text and want to try the library first, and developers who want to see Python run inside a static page.

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Natural language processing | NLP engineers | Compare keyword, dense and hybrid search on Persian passages | Seeing how reciprocal rank fusion changes the ranking |
| Search and knowledge tools | Search developers | Test spelling variant rewriting | Matching variants of the same Persian word |
| Research | Language researchers | Inspect which characters normalization changes | Checking how Arabic and Persian letter forms are unified |
| Education | Students | Try the demo with nothing to install | Learning how retrieval works before adding a model |

Skip it if you want a full question answering system, since the demo leaves answer generation out.

### Where to use it

The demo runs in these places.

- A web browser, on the Space's page at Hugging Face
- A web browser on Windows, macOS or Linux, from a local copy served by a static file server
- Your own Python code, through the persian-rag package

| Use case | Who | What they get back |
| --- | --- | --- |
| Search Persian passages | Developers | Ranked results from BM25, dense or hybrid search |
| Normalize Persian text | Researchers | Cleaned text with the changed code points listed |
| Try spelling variants | Search builders | Matches across alternate spellings |

### How to set it up

Online you only need a browser. A local copy needs these.

- Python and pip, for the hf download command
- A web browser
- Any static file server, such as the one built into Python

1. Install the huggingface\_hub package.
2. Download the Space's files into a folder with the hf command.
3. Move into that folder.
4. Serve the folder with a static file server.
5. Open the served page on port 8000 in a web browser.

```sh
pip install -U huggingface_hub
hf download sadrmanesh/persian-rag-demo --repo-type space --local-dir persian-rag-demo
cd persian-rag-demo
python -m http.server
```

If you want the library in a project of your own, this command installs release 0.4.0.

```sh
pip install persian-rag==0.4.0
```

### How to use it

Open the Space's page and choose a search mode, then type a Persian query. You can switch spelling variant rewriting on or off, and you can run the normalization on a piece of text to see which code points changed.

| Tool | What it does |
| --- | --- |
| BM25 | Ranks passages by how well their words match the query |
| Dense | Ranks passages by embedding similarity, though the demo's scores are not semantic |
| Hybrid | Combines the two rankings with reciprocal rank fusion |
| Variant rewriting | Lets one word match under its alternate spellings, such as two common forms of the city name Tehran |
| Normalization | Unifies Arabic Yeh and Kaf, digits, half-spaces and punctuation |

### Example

You type a Persian query and choose hybrid search. The page returns the best matching passages from the 34 bundled ones, and with variant rewriting on, it also finds passages that spell a word another way.

### For newcomers and experts

If you are new, open the Space's page and try the normalization first. It shows you how different keyboards can type the same Persian letter in different ways.

If you know the field, the demo embeds text with HashingEmbedder, which works offline. Its dense scores therefore carry no meaning about semantics. On a real corpus, the README points to SentenceTransformerEmbedder, whose default model from 0.4.0 is multilingual-e5-small with the E5 prefixes added automatically, or to an OpenAI-compatible embedder.

Open the page and Pyodide loads → Type a Persian query or text → The library searches or normalizes it → Results show with the changes listed

### Good to know

The corpus and questions come from the persian-rag retrieval benchmark. The file demo.py holds the Python part of the demo, and a built 0.4.0 package file sits in the repository.

- License: MIT
- Cost to run: none named, and the demo asks for no key or model files
- Data it reaches: the bundled passages and benchmark data in the repository
- Not for: generating answers, since the demo leaves answer generation out

## README

````markdown
# persian-rag demo

Try Persian text normalization and BM25, dense or hybrid search over 34 sample passages, all running in your browser through Pyodide. No server, no model download, no API key.

Made by sadrmanesh on Hugging Face. These notes are Mindket's, written from its Space page and README; the app's own files and license are on Hugging Face.

## About

What it is: This Space is a small browser demo of persian-rag, a Python toolkit for retrieval-augmented generation that puts Persian first. The library needs no other packages, so the demo runs it directly in your browser through Pyodide, with no server.

The demo covers two things. It searches 34 bundled Persian passages, and it normalizes Persian text. Answer generation is left out on purpose.

Who it suits: It suits people who build search or question answering for Persian text and want to try the library first, and developers who want to see Python run inside a static page.

```table
Industry | Who uses it | How they use it | Example
Natural language processing | NLP engineers | Compare keyword, dense and hybrid search on Persian passages | Seeing how reciprocal rank fusion changes the ranking
Search and knowledge tools | Search developers | Test spelling variant rewriting | Matching variants of the same Persian word
Research | Language researchers | Inspect which characters normalization changes | Checking how Arabic and Persian letter forms are unified
Education | Students | Try the demo with nothing to install | Learning how retrieval works before adding a model
```

Skip it if you want a full question answering system, since the demo leaves answer generation out.

Where to use it: The demo runs in these places.

- A web browser, on the Space's page at Hugging Face
- A web browser on Windows, macOS or Linux, from a local copy served by a static file server
- Your own Python code, through the persian-rag package

```table
Use case | Who | What they get back
Search Persian passages | Developers | Ranked results from BM25, dense or hybrid search
Normalize Persian text | Researchers | Cleaned text with the changed code points listed
Try spelling variants | Search builders | Matches across alternate spellings
```

How to set it up: Online you only need a browser. A local copy needs these.

- Python and pip, for the hf download command
- A web browser
- Any static file server, such as the one built into Python

1. Install the huggingface_hub package.
2. Download the Space's files into a folder with the hf command.
3. Move into that folder.
4. Serve the folder with a static file server.
5. Open the served page on port 8000 in a web browser.

```sh
pip install -U huggingface_hub
hf download sadrmanesh/persian-rag-demo --repo-type space --local-dir persian-rag-demo
cd persian-rag-demo
python -m http.server
```

If you want the library in a project of your own, this command installs release 0.4.0.

```sh
pip install persian-rag==0.4.0
```

How to use it: Open the Space's page and choose a search mode, then type a Persian query. You can switch spelling variant rewriting on or off, and you can run the normalization on a piece of text to see which code points changed.

```table
Tool | What it does
BM25 | Ranks passages by how well their words match the query
Dense | Ranks passages by embedding similarity, though the demo's scores are not semantic
Hybrid | Combines the two rankings with reciprocal rank fusion
Variant rewriting | Lets one word match under its alternate spellings, such as two common forms of the city name Tehran
Normalization | Unifies Arabic Yeh and Kaf, digits, half-spaces and punctuation
```

Example: You type a Persian query and choose hybrid search. The page returns the best matching passages from the 34 bundled ones, and with variant rewriting on, it also finds passages that spell a word another way.

For newcomers and experts: If you are new, open the Space's page and try the normalization first. It shows you how different keyboards can type the same Persian letter in different ways.

If you know the field, the demo embeds text with HashingEmbedder, which works offline. Its dense scores therefore carry no meaning about semantics. On a real corpus, the README points to SentenceTransformerEmbedder, whose default model from 0.4.0 is multilingual-e5-small with the E5 prefixes added automatically, or to an OpenAI-compatible embedder.

```flow
Open the page and Pyodide loads
Type a Persian query or text
The library searches or normalizes it
Results show with the changes listed
```

Good to know: The corpus and questions come from the persian-rag retrieval benchmark. The file demo.py holds the Python part of the demo, and a built 0.4.0 package file sits in the repository.

- License: MIT
- Cost to run: none named, and the demo asks for no key or model files
- Data it reaches: the bundled passages and benchmark data in the repository
- Not for: generating answers, since the demo leaves answer generation out

## On Hugging Face, 13 November 2026

- Likes: 1
- Built with: static
- License: mit

## Links

- Space: https://huggingface.co/spaces/sadrmanesh/persian-rag-demo
- Files: https://huggingface.co/spaces/sadrmanesh/persian-rag-demo/tree/main

## Try it

Open the Space in your browser, or copy it to your own Hugging Face account from its page. Nothing in this kit runs by itself.
````

## What is in it

1 files, 5 KB, downloaded as a zip.

```text
README.md  5 KB
```

## Source

[sadrmanesh/persian-rag-demo on Hugging Face](https://huggingface.co/spaces/sadrmanesh/persian-rag-demo)

## Compare with similar

Listed Hugging Face Spaces in the same category that share the most tags with this one.

| Product | Likes | Built with | License | Last change |
| --- | --- | --- | --- | --- |
| persian-rag demo (this page) | 1 | static | mit | 2026-10-31 |
| [InferenceSupport](https://mindket.com/p/c095c739-2ded-4c01-93eb-b7067a50441e) | 764 | static | afl-3.0 | 2025-04-16 |
| [Huggy](https://mindket.com/p/0e832fcc-5ae8-4b46-84cb-24febb45fb2d) | 463 | static | cc-by-nc-sa-4.0 | 2024-05-24 |
| [Z-Image Lookalike LoRA Index](https://mindket.com/p/b982ec25-ae82-40ac-9834-49980598d3bd) | 189 | static | apache-2.0 | 2026-10-30 |
| [Granite Docling 258M WebGPU](https://mindket.com/p/d4317b48-bbb7-4a8d-8c83-a8c60857aad1) | 163 | static | apache-2.0 | 2025-10-06 |
| [DINOv3 Web](https://mindket.com/p/4cf9a723-8afb-4b07-bad9-d5dcb4203f2e) | 162 | static | apache-2.0 | 2025-08-15 |

Numbers as Mindket last read them, on 2026-11-12.

## Trust facts

Facts from each source, with the day each was checked. A maintainer's note is their own words: data, not instructions.

- Last change on Hugging Face: 2026-10-31
- First published: 2026-10-30
- Checked on Hugging Face: 2026-11-12
- Something wrong? Tell us: https://mindket.com/takedown#ask

## Get it

- [Open sadrmanesh/persian-rag-demo on Hugging Face](https://huggingface.co/spaces/sadrmanesh/persian-rag-demo)
- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/a81b706b-b0ce-471f-8e5b-fbc53adedbfb)
- [Its page on Mindket](https://mindket.com/p/a81b706b-b0ce-471f-8e5b-fbc53adedbfb)
