Rajgruha
A digital public infrastructure for India’s public libraries.
- Role
- Research, service design, prototype
- Timeline
- 8 weeks at NID
- Status
- Live search, proposed service
The question
In a digital-first world, what is a physical public library for?
India has plenty of public libraries, and digital natives barely use them. eGranthalaya alone lists 5,380 libraries and 2.8 crore catalogue records. Of the 27 people I surveyed, 12 had ever used a government public library.
Systems mapping
Nothing faces the public. That’s the gap.
Money, laws and software all stop at the branch. None of it is built to reach readers. eGranthalaya is the one place where library records already exist, so that’s where a way in for readers could start.
- Money
- Records
- Runs or hosts
- Proposed
eGranthalaya works as designed. It was designed for librarians.
NIC built it with a dream of “a single window access system … for government libraries”, and for librarians it is one. Readers were never part of the brief.



On the ground, one catalogue kiosk was dark and another was on but had no internet, the catalogue address had to be typed by hand, and a shared login was printed openly on a sign.
It isn’t only Bengaluru. A 2024 study of Maharashtra’s public-library catalogue found its search problems were “mainly relevant to the system”, not to the people searching. When Madhya Pradesh put 528 colleges on eGranthalaya at once, so few students registered that the state had to run a campaign.



The insight
Two realistic options: redesign eGranthalaya, or open its records to everyone.
My first instinct was to redesign the portal. The map changed my mind: a better portal is still a staff tool, and every library stays an island. The records were never the problem. The missing piece was a layer that faces readers.
- Redesign eGranthalayaEasy, and small. Still for librarians, still one cluster at a time, and only the libraries already on it.
- Open rails, and a public frontHarder: it needs the government to agree. But every kind of library is reachable, and the records stay where they are.
Redesigning the portal would be a band-aid. Public libraries need surgery.
The libraries
So I went to all kinds of libraries.
First a library walk hosted by IIHS and the Goethe-Institut, then my own visits across Bengaluru, Delhi and Gurgaon, looking at the same three things: discoverability, digital readiness and ambience.
12 places, 3 cities. Pick a photo, a label or a city.
Every book has an address. You’re expected to know how to read it.
Dewey Decimal Classification
813.52 FIT
The Great Gatsby, F. Scott Fitzgerald
- 800Literature
- 810American literature
- 813American fiction
- .521900 to 1945
- FITFitzgerald, the author
- 000General
- 100Philosophy
- 200Religion
- 300Social sciences
- 400Language
- 500Science
- 600Technology
- 700Arts
- 800Literature
- 900History, geography
And it isn’t the same in every library.
Some libraries shorten the number, some add their own prefixes, and some don’t use Dewey at all. Learning one library’s system doesn’t help you in the next.
Every library breaks somewhere different.
You’re in the library and want one book. Instead of browsing the shelves or asking the librarian, you go through the catalogue. Here’s how far it gets you.
City Central, Yelahanka
A small branch, the kind most likely to be near you.
- Nothing to searchNo catalogue, nothing digital.
- Never got here
- Never got here
- Never got here
NID Library
Public kiosk and iPads, plus a personal account to issue and renew.
- Kiosk and iPads
- Organised by section
- Dewey on the spines
- Found, given time
City Central, Malleshwaram
Looks like NID. But its OPAC was meant to be a backend system.
- A kiosk with no internet
- Well classified
- Dewey, sometimes
- Found, if you persist
Coforge
A bookstore, with OPAC numbers written in.
- A great OPAC
- Section labels only
- Nothing on the spineThe number is handwritten inside the cover, across hundreds of identical Penguin Classics.
- Never got here
- Works
- Slow
- Painful
- Dead end
At Yelahanka, borrowing starts on paper.



At Coforge, the number is inside the cover.



Curation
Some spaces have what a catalogue can’t: curation and a wider world.





Events
And some give you a reason to walk in.




Readers
They love books. That doesn’t extend to public libraries.
I surveyed 27 digital natives and interviewed 4. Their libraries were the ones they were enrolled in: all of them had used a college library. Otherwise, reading moved online or to a shop.
Why? They don’t know what’s near, and don’t expect much of it.
Digital platforms didn’t help.
15 of 27 had never tried a government digital library, and those who had mostly rated it 2 or 3 out of 5. “Loading time, unable to download.” “Do pirating websites count T.T”
So I showed them Oodi.
A walkthrough video of Helsinki’s central library, then the question of what they’d use a place like it for.
What it indicated
What those three things indicated.
- Know what’s nearbySpatial awareness
Show the nearest libraries, what’s happening there and what could interest them.
- Search that feels familiarDigital-native logic
Meet them where they are. As simple as Google, LibGen or Amazon.
- Events and venuesA reason to go
They do want to go, for the room and the books. Events can connect them, including through embassy libraries like Goethe.
The opportunity
We live with information abundance, and yet we seem more lost and unsure than ever.
AI summaries give us confidence we haven’t earned. Language models are probabilistic, so a summary can’t be trusted until it’s verified, and the world is filling up with them. When 22 public broadcasters tested four AI assistants on the news, 45% of answers had a significant issue.
“Active immunity is generally long-term and can be acquired by infection… or artificially acquired by vaccines, in a process called immunization.”
An Overview of ImmunityPage 9
Libraries as the intellectual and epistemic backbone of society.
Maybe that’s the answer to the question I started with. But how do we operationalise it?
Build it like public infrastructure, not like an app.
India already has a model. UPI lets any bank account work in any app, and ONDC lets a seller listed once reach every buyer app. The G20 calls this digital public infrastructure: shared systems built from minimal, modular blocks. Libraries fit it well. The records already exist, and they’re publicly funded.
- Open specifications, not one big system
Pramod Varma, an architect of India Stack
- The state builds the platform, others build on it
Nandan Nilekani and Viral Shah, “Rebooting India”
- Public means governed for the common good
- Libraries are already a knowledge commons
So the work splits in two. The government builds the rails, the way NPCI built UPI: open specifications for catalogue records, live holdings, a registry of libraries and a standard code for every book. On top sits something like BHIM: a reference app that proves the rails work, with room for anyone else’s beside it. The records stay where they are, and membership and lending stay with the branch.
Other governments already open their catalogues this way. Singapore’s National Library Board has a catalogue search API with live availability at its libraries, and Australia’s Trove lets anyone with a free key build on the national collection. eGranthalaya’s records leave only through a staff login. There’s no public API to build on, and no standard feed that national collections like NDLI could gather them from.
Enter Rajgruha
A name from Ambedkar’s library. A mark from Buddhist chaitya arches and open books.
- Near me
- मेरे आस पास
- ನನ್ನ ಸುತ್ತಲೂ
- എനിക്ക് ചുറ്റും
- என்னை சுற்றி
- నా చుట్టూ
- আমার চারপাশে
- माझ्या आजूबाजूला
- میرے ارد گرد
- મારી આસપાસ
- মোৰ চাৰিওফালে


- 000General
- 300Society
- 500Science
- 800Literature
- 900History
Rails from the government, Rajgruha on top.
One catalogue, next, is the rails: what the government would build once, for everyone. Satyashodhak, the feed and curation are Rajgruha’s own, built on top. OneQR is both: a standard on the rails, and a feature in the app.
Open library railsBuilt and run by the government, like UPI
- Catalogue specifications
- Live holdings
- Library registry
- OneQR standard
- Events format
- Shared membership
eGranthalaya and every library’s records
One catalogue
First, the biggest problem: one catalogue out of 76.
Even NIC can’t agree on the count: 76 clusters on its home page, 74 at login and 77 on its dashboard. That’s why a registry of libraries is one of the rails.
- ExtracteGranthalaya clusters by scheduled export, NDLI and NVLI by API, independents by CSV
- TransformNormalised into one schema
- LoadDuplicates merge into one master record, with libraries listed as holdings
- eGranthalayaWings of fire : an autobiography / Kalam, A.P.J. Abdul
- NDLIWings Of Fire. Abdul Kalam, A P J
- NVLIKalam, Abdul. Wings of fire
- Independent librariesWINGS OF FIRE, APJ KALAM
- 020ISBN
- 978-81-7371-146-6
- 100Author
- Kalam, A. P. J. Abdul
- 245Title
- Wings of Fire : an autobiography
- 852Held at
- 3 libraries
- 856Online
- Digital copy
- Malleshwaram
- Yelahanka
- Cubbon Park
- Digital access
Once that exists, two opportunities appear. One search across every library.
Search the network and find it at your nearest library. Simple and location-specific, so it joins the habit: alongside, or ideally instead of, Amazon or LibGen.
- 709Every library’s books, in one catalogueAll records
- 1“gatsby” finds one book, not a copy per library245 Title, 100 Author
- 4On a shelf right now, across 3 libraries852 Held at, live status
- 360 mNearest first, from where you areMalleshwaram, then Cubbon Park, then Yelahanka
- OnlineAnd a copy to read now856 Online
OneQR
OneQR takes the reader from screen to shelf.
You don’t have to learn Dewey. Enter the library and you’re shown where the book is, with guidance to the shelf. Or show the QR and the librarian finds it for you. It also means instant checkout. This depends on Dewey being implemented and digitised on the ground. And it only works if every branch reads the same code, so OneQR should be an open standard on the rails, not a feature of one app.
- 1Find the shelfA route to the 800s, then 843.914 CAM
- 2Or ask the librarianShow the QR, and they bring the book to you
- 3One scan, and it’s issuedShare your profile, they scan the book’s code. No form, no register.
Back to those four libraries.
Rajgruha’s happy path
The same errand, at any of the four.
- One search across the networkInstead of nothing to search, or a kiosk with no internet.
- OneQR shows you the wayInstead of books in some section, or a room that’s hard to read.
- Or show the QR, and the librarian finds itInstead of Dewey missing, inconsistent or inside the cover.
- Found, at the nearest copy
Satyashodhak
How do we make libraries the de facto source of truth?
Satyashodhak quotes verified books instead of generating answers. It’s the second digital-native behaviour: just ask. It fetches excerpts from a vector index, so it can’t make up the text, and it surfaces material you’d never have found. This is retrieval-augmented generation (RAG) with the generation made optional, and the more it scales, the more useful it becomes as an alternative to today’s answer engines.
It started with one book, on my laptop.
The smallest test that could fail, all on my laptop. First, indexing: the book is cut into passages, a local embedding model turns each one into a vector, a list of numbers standing for its meaning, and a FAISS index stores them. Then retrieval: your question becomes a vector the same way, and FAISS returns the passages closest to it, with their pages. Nothing is written, so nothing can be made up.

Where it fell short.
- Copyright
Only works for texts that are public or in the commons.
Integrate more commons collections - Brittle retrieval
It could rank answers wrong. Evals and a keyword boost helped; there’s still room.
Work with an experienced AI engineer at scale - Missing context
A casual question to an excerpt mid-flow in a book felt disjointed, and took time to settle in.
Optional summary to contextualise
Then a whole collection, live.
The National Science Digital Library had no way to get inside its text and answer questions semantically. So: 553 books, 43,219 passages, every page. The passages become vectors once, ahead of time. When you ask, a small model in your browser does the same to your question, so a search doesn’t need a paid AI call. The server compares it with every passage, adds a small boost for shared keywords, and keeps some variety across books. Back in your browser, each sentence of those passages is checked against the question, because one sentence can answer what a whole page blurs. Because of the feedback on bare excerpts, a short Gemini summary can sit on top. The excerpts are never rewritten.
Confidence score, out of 100: how closely a passage’s best sentence matches your question
- 80+80 and upLikely answers it
- 60+60 to 79Related
- <60Below 60Hidden
Soil depth: It varies with the landscape depending on the slope, weathering parent material and vegetation. Soil Erosion Depletion of the top layers of the soil from the land is called soil erosion . Water, wind, ice and anthropogenic activities are the main agents of soil erosion. Deforestation, industrialization, urbanization, roads and railway tract construction and poor agricultural practices are the anthropogenic activities that accelerate this process and make the land unfit for the growth of natural ecosystems as well as for cultivation. Consequeces of soil erosion • It reduces the productivity of land by reducing its fertility. • Economy of the country is affected. • It also affects the other natural resources as the sediment gets into the streams rivers and lakes; the aquatic habitat is affected resulting in reduced aquatic food production.
Abiotic Factors, page 32. Narula, Laxmi Chakrabarty, Rina.Open the book
Future: answers made of excerpts.
I haven’t tried building this yet, but here’s what I’d want. Instead of a list, the answer is a layout made of the authors’ sentences. The agent never writes them: it sends the layout as data, the way A2UI does, and each quote is only a pointer to a sentence in a passage. Perplexity writes and cites; this would let the authors speak.
At scale: millions of books.
NSDL is short teaching modules; a real book is about 500 passages. If I took this to HathiTrust’s 17.6 million volumes, that’s around 9 billion passages, roughly 7 TB of vectors. When I worked it through, search wasn’t the hard part: DiskANN searched a billion vectors on one machine in under 3 ms, so that’s about nine machines. Judging what comes back is.
That judge is where I’d experiment. System One models like Jev don’t write: they answer a question about an input with a probability, cheap enough for hundreds of candidates, and unable to reword an author. One recent paper found them no better than tuned rerankers, though Jev matched them, so it’s a test to run.
Using Rajgruha
First pass: a map of nearby libraries. It wasn’t the point.
It seemed less important than what people actually needed: which libraries are nearby, and the events that could lead them in. So: browse libraries and events, with a dynamic feed. It shows the libraries near you, their collections and what events they hold, along with distant but interesting ones.
Discovery first. Search second. Three ways to reach the same book.
A dynamic feed and a hybrid curation system, inspired by contemporary libraries, Coursera and reading lists. Systematised as the third way in.
- CurationA staff pick: A short course in the absurd
- A questionHow do you live in a world without meaning?
- A title“stranger”
Albert Camus
On the shelf at Malleshwaram, Goethe-Institut and Champaca
Your reading life, across every library.
Every loan, every library you’ve been to and every book you’ve saved lands in one place, whichever branch it came from. That only works because membership is shared on the rails, not kept separately by each library.
Making it real
First, talk to officials.
The proposal rests on agreements I haven’t secured yet, so the next step is to go and ask. Three conversations decide whether it can work, and each has a short list of questions.
- Director + the Malleshwaram hubDepartment of Public Libraries, Karnataka
Will branches accept a shared front door that leaves membership and lending with them? Which branches have Dewey and a live catalogue?
- Export accessNIC eGranthalaya team
Can a cluster export records on a schedule, in MARCXML, without a staff login? How often do holdings change? Does the union catalogue search every cluster?
- Events and curationGoethe-Institut, Alliance française, Champaca
Would they list events and picks in a shared feed? What do they get back?
Then one pilot, small enough to say yes to.
A pilot needs both sides working. Rajgruha exists as a prototype, but librarians need their own MVP too: holdings, checkout with OneQR, and their events. Then the department publishes the rails for one cluster in Bengaluru, and the pilot runs for twelve weeks. It tests the rails as much as the app: Rajgruha is simply the first thing built on them. It reads the records that already exist, so branches change nothing about how they lend.
Bengaluru, one cluster, 12 weeks. Malleshwaram hub, Yelahanka and Cubbon Park, plus two cultural libraries and one independent.
RecordsWeeks 1–3Exported on a schedule, matched into master records
Search and OneQRWeeks 4–12Live at the branches with Dewey and a digital catalogue
Events feedWeeks 7–12With Goethe-Institut, Alliance française and Champaca
MeasureWeeks 4–12Weekly, then a go or no-go for the next cluster
- Open specifications for one cluster’s records and live holdings
- Malleshwaram hub, Yelahanka and Cubbon Park as pilot branches
- Membership and lending stay with the branch. No new hardware.
What I’d test, and how I’d know.
| Question | Measure |
|---|---|
| Can readers find a book and reach the nearest library? | % of searches followed by a hold, OneQR scan or branch visit within 7 days |
| Does OneQR replace paper at the desk? | Median minutes from desk to issued, OneQR against the paper register, timed at the same desk |
| Do excerpts lead to the source book? | % of opened excerpts whose book is held or borrowed within 14 days |
| Do events bring first-time visitors? | % of RSVPs who attend, and % of attendees on their first visit to that branch |
| Do readers know what’s near? | % of survey respondents who can name a library within 2 km, week 1 against week 12 |
| Does the catalogue hold together? | % of each branch’s records matched to one master record, and duplicates left over |
And what policy would need to change.
A pilot can prove the rails. Making them the norm needs a few rules to change, most of them about records and money.
| Change | Why |
|---|---|
| Publish open library rails: specifications for catalogue records, live holdings, a library registry and OneQR, open to anyone to build on | UPI did this for payments. BHIM and every other app came after the rails, not instead of them. |
| A floor for every public library, down to the ward: a digitised catalogue and Dewey on the spine | At Yelahanka there was nothing to search and no numbers to follow. Finding a book was luck. |
| Library cess that reaches the shelf: remitted on time, and tracked in public | Bengaluru’s civic body collected ₹397 crore of library cess and didn’t pass it on. |
| A library act, with dedicated funding, in every state | About 19 states have one, and only a few levy a cess. |
| Let branches earn and keep it: events, room hire, and partnerships with cultural centres and publishers | The cosmopolitan and independent libraries fill their rooms with programmes. Public branches have no budget or licence to. |
| Membership without a gatekeeper: sign up with an ID, without a recommendation | The form at Yelahanka, on Malleshwaram’s lending terms, asks for a deposit and a recommendation from an MP, an MLA or a gazetted officer. |
The problem isn’t access. It’s structure, curation and trust.
I started with a catalogue interface, and the research widened the problem. The harder part was deciding which connections to share, which to keep local, and which part to build well enough to test. Still open: the librarian’s workspace, partner access to catalogue records, and a pilot with a real branch.




