abhyasa
abhyasa (अभ्यास) means steady practice. It is a tutor that asks you questions and makes you do the thinking. It never gives the answer first. You answer in text or by voice, and you can think aloud. The tutor grades your reasoning, not only the result. A learner model keeps the depth of each concept that you know, and the date of its next review.
How it works
Each question goes through one loop:
- Pick. Code chooses the next concept and the depth: a due review first, then the frontier. The app shows the reason.
- Ask. A model writes one question at that depth, with a hidden model answer and a rubric.
- Struggle. You answer. A wrong try gets the first error and a nudge, but no fix. You can ask for hints, one rung at a time.
- Grade. The model grades the answer and the think-aloud. Code grades choice questions and code exercises.
- Update. Correctness and confidence move the floor, the ceiling and the next review date of the concept.
- Teach. After a miss, the tutor teaches the smallest step that fixes the first error. Then it asks a check question.
| term | meaning |
|---|---|
| concept | one idea that you can be asked about |
| depth | 0 unseen, 1 recognise, 2 recall, 3 explain, 4 apply, 5 transfer |
| floor | the highest depth that you pass reliably |
| ceiling | the lowest depth that you failed |
| attempt | one answer, kept as a vault document |
| session | one sitting of questions, with a summary |
| hint | one rung of a ladder of six, from the least to the most revealing |
| lesson | the smallest step that the tutor teaches after a miss |
Install and run
Install the package and its dependencies:
uv sync
Start the web app on http://127.0.0.1:5077:
uv run abhyasa
The app listens on the loopback address only. These variables change the defaults:
| variable | what it sets | default |
|---|---|---|
ABHYASA_VAULT |
the vault file | the vault of vishalakshi |
ABHYASA_MODEL |
the rishi model for questions, grades, hints and lessons | claude/sonnet |
ABHYASA_STT |
the speech-to-text engine: gemma or whisper |
gemma |
Surfaces
All surfaces use the same tutor and the same data.
Web app
The web app is made from blocks under abhyasa/blocks:
| block | what it does |
|---|---|
today |
the home page: what is due and what to do now |
session |
one sitting with the tutor: one question at a time, with hints, confidence and “I don’t know” |
voice |
a mic button for each text box; it turns speech into text on this machine |
concepts |
the list of concepts, and one page for each concept with its state |
graph |
the concept graph: a color for each floor, a ring when a review is due, arrows for prereqs |
search |
one search over the learning shelf and the other shelves of your vault |
add |
add concepts from a text, a vault document or vedicreader |
ramabana
The /learn extension gives the tutor in the terminal, beside your code.
To turn it on, make the file ~/.config/ramabana/extensions/abhyasa.py with this line:
from abhyasa.rama import setup
Notebooks
In leela or Jupyter, learn shows a question card. exercise gives a code exercise that its tests check in the kernel.
from abhyasa.nb import learn, exercise
learn('reciprocal-rank-fusion')
ex = exercise('reciprocal-rank-fusion')
Where the data is
All data is on the learning shelf of the vishalakshi vault.
Each concept, attempt and session is one vault document, so other tools can search it.
Tests use a vault in a temporary folder and never open your real vault.
Example
This example runs offline. temp_learning makes a shelf in a temporary vault, and Fake replaces the model.
from abhyasa.store import temp_learning
from abhyasa.llm import Fake
from abhyasa.tutor import Tutor
lr = temp_learning()
lr.put('Ranking', 'Order items by a score.', 'ml')
fake = Fake({'You grade one answer': dict(correct=True, grade=8, first_error='', misconception='', feedback='Yes. Only the order counts.')},
dflt=dict(question='Why can you compare ranks from two systems, but not their scores?', answer='Ranks share one scale.', rubric=['ranks share one scale']))
t = Tutor(lr, fake, context=False)
Ask the first question. why gives the reason for the choice. A new concept starts at depth 3 (explain).
q = t.next()
assert q.why == 'next on the frontier: its prereqs are in place'
assert q.depth == 3
print(q.question)
Answer with high confidence. A solid pass at depth 3 raises the floor to 3.
r = t.answer(q.id, 'A rank is a position, and positions use the same scale in each list.', confidence=80)
assert r.outcome == 'solid'
assert lr.concept('ranking').floor == 3
Metadata
Release files for abhyasa 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| abhyasa-0.0.1.tar.gz | 929.6 kB | Without provenance | Details for abhyasa-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| abhyasa-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for abhyasa-0.0.1-py3-none-any.whl |
Total release size: 1.9 MB
Release files / abhyasa-0.0.1.tar.gz
| Download URL | abhyasa-0.0.1.tar.gz |
|---|---|
| Size | 929.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
221250c943ab9a2a271b876940269bb5e440b28d1de4eda829b56d29793a23c6
|
|
BLAKE2b-256 checksum How to use checksums |
7087066ebab06f043ef3ce3a8e6a1401bf9fcd9b90c6221f7dfc7e9e83839b3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / abhyasa-0.0.1-py3-none-any.whl
| Download URL | abhyasa-0.0.1-py3-none-any.whl |
|---|---|
| Size | 950.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5b797b6abd0f682b32584cc18040c7eacf5fd1b043c63e541a42ff7ba028aec5
|
|
BLAKE2b-256 checksum How to use checksums |
4268fedcb5269b36be39f546ec5a495695a2de996cfaa5d1c721217351043e30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Security for abhyasa 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.