OPEN-SOURCE PAPER STUDY · EGYPTIAN ARABIC

Study the paper.
Inspect the claim.

An experimental Telegram tutor that teaches arXiv AI papers in Egyptian Arabic, connects paper claims to exact source excerpts, and keeps the original page within reach.

Private development prototype · Not a public hosted tutor

THE INPUTOne versioned arXiv paper
THE METHODBounded writing + claim checks
THE OUTPUTA lesson you can trace

WHO IT’S FOR

A reading companion,
not an answer oracle.

ScholarLens is for students, engineers and researchers who want to discuss an AI paper in Egyptian Arabic while keeping English technical terms and original quotations accessible.

It does not replace reading the paper. A generated explanation can miss context or misread a table. The claim-checking system establishes where a retained claim came from and checks its copied support; it cannot prove that the model interpreted the science correctly.

The repository is available to run with your own bot, configuration and provider access. Core paper study uses public arXiv PDFs, SQLite and hosted generation. No local LLM weights are needed for that path.

Read the paper-study guide

THE STUDY FLOW

From a paper link
to a conversation.

Four steps. The source stays attached to the session.

  1. 01

    Open a paper

    Send an arXiv ID, URL, or search by English title. Title results require an explicit choice.

    /paper https://arxiv.org/abs/2005.11401v4
  2. 02

    Receive a lesson

    Read an Egyptian-Arabic introduction with source pages, background labels and a comprehension question.

    شرح تمهيدي + المصدر
  3. 03

    Ask a follow-up

    Question the method, request a simpler explanation, or try a quiz. Recent dialogue is not treated as evidence.

    اشرح الطريقة بمثال بسيط
  4. 04

    Keep study notes

    Retrieve the saved first lesson and its exact quotations. A reading map orders the reviewed sections.

    /notes

ILLUSTRATIVE DIALOGUE

What the exchange can feel like.

This is a composed example of the interface, not a captured bot response. The wording is illustrative and the excerpt is a placeholder; do not treat it as a scientific claim about a particular paper.

Actual paper-claim lessons may withhold content or fail when no paper claim can be confirmed; missing evidence and failures are reported rather than masked by a confidence badge.

SL
ScholarLensIllustrative private study chat
EXAMPLE
/paper https://arxiv.org/abs/2005.11401v4
📖 شرح تمهيدي

الفكرة الأساسية: النموذج بيجمع بين معرفته وبين مقاطع مسترجعة من مصدر خارجي.

↩︎ المصدر: ص ٣ · مثال توضيحي

يعني إيه retrieval هنا؟

يعني نختار مقاطع مرتبطة بسؤالك قبل ما نكتب الإجابة. تخيّلها زي إنك تفتح الصفحات المطلوبة بدل ما تعتمد على ذاكرتك بس.

مثال توضيحي — ليس ردًّا مسجلًا
/notes
ORIGINAL EXCERPT

“…the exact quotation from the selected paper appears here…”

Placeholder text, not a paper quotation.

SYSTEM DESIGN

Boundaries are part
of the product.

The diagrams describe the implementation, not a proposed future architecture. Inline SVG keeps them dependency-free.

01 / REQUEST PIPELINE

One selected version.
One bounded study graph.

The bot and study API are local. The access gate checks membership before a user’s service is resolved. The graph resolves the paper, extracts page-linked text, then teaches.

StudyService implementation
ScholarLens request pipelineTelegram passes through the bot, study API, access gate and per-user registry to StudyService. The graph resolves, extracts and teaches; the model pool calls the Hugging Face router, which routes to GLM-5.3 on Fireworks. Telegramprivate chat Botlong polling Study API127.0.0.1:8002 Access gatemember + quota Registryservice per user StudyService · LangGraphversioned source identity · bounded state · durable jobs ResolvearXiv ID / title ExtractPDF → page blocks Teachwrite + claim check Delivernotes + reading map REFUSED USERS STOP AT THE GATE · NO MODEL CALL
02 / CLAIM CHECK

A copied span is proof
of location, not meaning.

The writer produces claims with evidence IDs. Deterministic screens check IDs, numbers, repetition and unrequested superiority claims. A separate checker returns supporting spans; the application verifies their exact location.

Only retained paper claims reach the student, notes and job result; separately labelled background, analogies and questions follow their own checks. A closing note gives the withheld count and headings, not their text.

Claim-check decisions
Per-claim grounding and withholdingA claim writer produces claims. Deterministic screens split the checking work into one or two calls. A supported verdict requires copied spans inside the claim's own quote, at least three words, and every claim number. Unverified claims are withheld. Writerclaim + evidence ID DeterministicIDs · numbers · screens Split checkone or two calls Verdictsclaim + analogy APPLICATION VERIFIES A “SUPPORTED” VERDICT 1Exact spans in the normalized quote1–3 spans; each ≤200 characters 2Distinct supporting wordsat least three, unless the quote is shorter 3Every claim numbermust occur inside the spans FAILED PROOF → unverified_support · MISSING VERDICT → missing_verdict Keep + show pageoriginal excerpt attached Withholdcount + heading only
What this does not guarantee

Semantic correctness, complete paper coverage, table interpretation, or equation verification. A paper-claim answer fails closed when no paper claim can be confirmed.

03 / MULTI-USER BETA

Fair access before
generation.

The beta is opt-in and owner-controlled. One-time invites create student memberships. Each student has isolated study state, daily allowances, and at most one active job.

Implemented and covered by offline tests; live Telegram acceptance remains pending.

Multi-user specification
Invite-only beta access, reservations and retentionInvited users pass the access gate. Jobs reserve three model calls, or four for deep research. Per-user services share a bounded first-in-first-out model pool. Student content is deleted after inactivity or forget; accounting remains. Invite / membershipowner · invited student AccessGaterate · daily count · dollar ceiling Reservation3 calls · /deep: 4 Admitor refuse SERVICE REGISTRY Student AStudent BOwner isolated StudyStore + StudyService · lazy creation · idle cleanup FIFO model-call pooldefault 3 slots · max 4 Settle usage + limitsonly delivered answers use quota 30 DAYS INACTIVE OR /forget → STUDENT CONTENT DELETED · ACCOUNTING RETAINED

A later claim check for a started job queues ahead of jobs that have not started; review halves share their job’s slot. These are model-call slots, not unrestricted user-session concurrency. The dollar ceiling is local accounting, not a provider invoice or billing guarantee.

04 / ROUTING + ADMISSION

Count first.
Bound each call.

The tutor serializes a strict request, checks its byte size and estimated tokens, and checks available memory. An admitted request has bounded time, output and attempts; uncertain work is not automatically replayed.

The pinned tokenizer is prepared explicitly, not fetched during generation.

Study transport
Model routing and token admissionA pinned GLM tokenizer counts the serialized request. Memory and token limits are checked before the bounded model pool calls the Hugging Face router. The current tutor route is GLM-5.3 on Fireworks. The older collection assistant uses a separate Cerebras route. Pinned tokenizerGLM-5.3 · SHA-256tokenizers 0.22.1 Pre-call admission≤20,000 estimated tokens≤128,000 request bytes Model pool600 MiB free-RAM floor85 s transport ceiling Hugging Face router/v1/chat/completions zai-org/GLM-5.3fireworks-ai · current tutor route Legacy assistantgpt-oss-120b / Cerebrasseparate route Bounded output · usage validated · attempt ledger settled3,000 output tokens max · no automatic retry of an admitted request MISSING / UNVERIFIED TOKENIZER → CONSERVATIVE UTF-8 BYTES / 3 ESTIMATE

The pre-call estimate is conservative: it counts the serialized request rather than only the message text. Accepted provider usage may reach 21,000 input tokens for cost accounting. `/deep` runs an optional owner-only research worker in a separate environment; its live failure is not declared repaired.

DESIGN DECISIONS

Choose what to verify.
Say what remains uncertain.

Each decision is linked to its implementation contract and measured limitations.

Source identity

Pin the paper version and source hash.

A stored paper carries its arXiv version, PDF SHA-256, parser revision and page-block IDs. Unversioned input resolves to an explicit version; title matches require selection.

Trade-off: only allowlisted arXiv inputs are accepted. You cannot paste an arbitrary PDF URL.

paper-intake ↗
Evidence

Attach original quotations on the server.

The model chooses evidence IDs; the application supplies the excerpts. Per-claim copied spans, number checks and screens replace a single whole-lesson verdict.

Trade-off: more work per lesson, and the checker can still misunderstand the evidence. Exact support is not semantic proof.

paper-evidence ↗ · claim-check ↗
Learning

Keep dialogue separate from the paper.

Four recent turns support continuity; they never become source evidence. `/notes` retains the first lesson and exact quotes. A reading map arranges lesson sections instead of inventing causal diagrams.

Trade-off: no mastery score, automatic progress claim, or full scientific-figure generation.

paper-tutor ↗ · learning-session ↗
Research tools

Isolate `/deep` and reserve its review budget.

The optional Deep Agents worker has read-only paper tools and no host shell, general filesystem, external web search or delegated subagents. It shares the admitted job’s four-call budget.

Trade-off: a separate Python environment is required, students cannot use `/deep`, and an observed live failure remains unresolved.

study-research ↗
Multi-user

Reserve the worst case before starting work.

Invitations, per-student state, daily counts and a shared dollar ledger sit in front of a bounded model pool. Failed jobs do not consume student paper/question quotas.

Trade-off: admission is conservative and accounting is not a provider billing guarantee. The owner’s general-knowledge fallback before opening a paper is outside this ceiling.

multi-user ↗
Evaluation

Freeze the paper set and publish missing evidence.

Thirty papers span six fields: twelve development and eighteen holdout. The report distinguishes measured outcomes from unmeasured metrics and owner-delegated AI judgments from human labels.

Trade-off: the current holdout is GLM-only and incomplete. No four-model ranking, statistical-significance claim, or measured holdout faithfulness.

paper-benchmark ↗

THE BENCHMARK, INCLUDING THE GAPS

Measured does not
mean proven.

Frozen GLM-5.3 / DeepInfra holdout results. The current tutor uses Fireworks; these numbers are not a Fireworks benchmark.

DELIVERY47/54

87.0% of first lessons and Q1/Q2 answers delivered across 18 holdout papers.

WRITER FORMAT98.53%

67/68 calls complied with the writer schema. Gate: at least 95%.

P95 JOB LATENCY · GATE MISSED94.485s

Nearest-rank p95. The predeclared gate was at most 90 s. Median: 25.766 s.

Holdout faithfulness is unmeasured.

The single approved judging invocation stopped on its first scoring operation with provider HTTP 429. Zero of 47 answers were scored. This does not mean zero faithfulness; it means no result.

Calibration reached exactly 34/40 = 85% agreement, with Cohen’s κ = 0.6712. The 40 labels were supplied by the assistant under explicit owner delegation, not independently by humans. Calibration therefore does not establish agreement with human labels or provide holdout quality scores.

Recorded holdout summary
Withheld claim outcomes201
Owner-delegated six-lesson rubric3.5833 / 5
Holdout generation accounting$1.36776250
Q3 answers requiring human reading13
Four-model holdout comparisonNot run
Holdout faithfulnessUnmeasured

Production moved from DeepInfra to Fireworks on 25 November 2026 after DeepInfra stopped serving GLM-5.3. One Fireworks development qualification lesson is not a new p95 estimate or quality result.

This is a small, assistant-authored benchmark. GLM was selected on development evidence. The reported rating is AI-delegated, not an independent human evaluation. No statistical significance is claimed. Accounting estimates are not provider invoices.

Read the full report, denominators and failure list

TECH STACK

Small interfaces.
Explicit dependencies.

The broader repository includes an older collection-answer platform. This list separates it from native arXiv study.

LayerImplementationRole
Language / APIPython 3.12 · FastAPI · UvicornLocal study endpoints and application services
ChatTelegram long pollingPrivate bot, per-chat commands and delivery; no inbound webhook required
Study graphLangGraph 1.2.15Resolve → extract → teach with bounded state
GenerationHugging Face Inference ProvidersGLM-5.3 via Fireworks for paper study; separate Cerebras legacy route
Paper intakearXiv API + PDFiumVersioned metadata, bounded PDF acquisition and isolated page-text extraction
ValidationPydantic · JSON SchemaStrict request, response, lesson and claim-check contracts
Study persistenceSQLitePer-user state, jobs, attempts, access controls and accounting
Reading mapsPillow / libraqm · Windows GDI fallbackDeterministic section-order maps when Arabic shaping and fonts are available
Optional researchDeep Agents · local stdio MCPSeparate, pinned environment and bounded read-only paper tools
Older platformOpenSearch · PostgreSQL · Docling · Airflow · OllamaBroader ingestion/indexing and indexed-collection answers, not required for native paper study
Quality checkspytest · Ruff · mypy · GitHub ActionsMocked unit/API tests and static checks on Ubuntu

This static site is plain HTML, CSS, inline SVG and optional JavaScript. No framework, build step, external fonts, tracking, cookies or browser storage. All core content and diagrams work with JavaScript disabled.

READ THE CODE. CHECK THE EVIDENCE.

Build your next paper discussion on something you can inspect.

Run the private prototype, review its limitations, or contribute an extraction fixture and a reproducible test.