django-explain-errors 0.9.2__tar.gz → 0.9.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {django_explain_errors-0.9.2/django_explain_errors.egg-info → django_explain_errors-0.9.3}/PKG-INFO +25 -33
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/README.md +24 -32
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3/django_explain_errors.egg-info}/PKG-INFO +25 -33
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/setup.py +1 -1
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/LICENSE +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/MANIFEST.in +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/django_explain_errors.egg-info/SOURCES.txt +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/django_explain_errors.egg-info/dependency_links.txt +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/django_explain_errors.egg-info/requires.txt +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/django_explain_errors.egg-info/top_level.txt +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/explain_errors/__init__.py +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/explain_errors/client.py +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/explain_errors/debug_page.py +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/explain_errors/management/__init__.py +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/explain_errors/management/commands/__init__.py +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/explain_errors/management/commands/build_error_index.py +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/explain_errors/middleware.py +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/explain_errors/rag/__init__.py +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/explain_errors/rag/indexer.py +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/explain_errors/rag/retriever.py +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/explain_errors/rag/store.py +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/explain_errors/sanitize.py +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/explain_errors/throttle.py +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/explain_errors/tracebacks.py +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/setup.cfg +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/tests/test_build_error_index.py +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/tests/test_client.py +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/tests/test_debug_page.py +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/tests/test_eval_fixtures.py +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/tests/test_eval_judge.py +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/tests/test_eval_run.py +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/tests/test_language.py +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/tests/test_middleware.py +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/tests/test_print_stdout.py +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/tests/test_rag.py +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/tests/test_sanitize.py +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/tests/test_signals.py +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/tests/test_throttle.py +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/tests/test_tracebacks.py +0 -0
- {django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/tests/test_truncation.py +0 -0
{django_explain_errors-0.9.2/django_explain_errors.egg-info → django_explain_errors-0.9.3}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: django-explain-errors
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.3
|
|
4
4
|
Summary: Django middleware that explains unhandled exceptions in DEBUG using an LLM, optionally grounded in your own project source via a local vector index. Works with OpenAI, Claude, or any OpenAI-compatible endpoint including local models.
|
|
5
5
|
Home-page: https://github.com/topunix/django-explain-errors
|
|
6
6
|
Author: topunix
|
|
@@ -546,41 +546,33 @@ django.db.utils.IntegrityError: NOT NULL constraint failed: blog_post.author_id
|
|
|
546
546
|
|
|
547
547
|
### Does RAG actually help?
|
|
548
548
|
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
of RAG-on's `no_fabrication` advantage may be judge and generator
|
|
573
|
-
overlapping on material RAG-off never sees rather than RAG-on being more
|
|
574
|
-
careful; and claim statuses are spot-checked, not exhaustively audited --
|
|
575
|
-
a script that flagged 14 of 363 claims on one run, all correct on manual
|
|
576
|
-
inspection, is a sample that turned up no false positive, not a proof
|
|
577
|
-
that none exists. Full per-fixture results, the judge prompt, and how to
|
|
578
|
-
reproduce this (about $1.37 for a `--runs 3` pass, most of it judge cost)
|
|
579
|
-
are in [`evals/README.md`](evals/README.md).
|
|
549
|
+
The package can explain an error in two ways:
|
|
550
|
+
|
|
551
|
+
- **RAG-off (default):** the model sees only the Django traceback.
|
|
552
|
+
- **RAG-on:** the model also sees relevant source code from your project, retrieved from a local index.
|
|
553
|
+
|
|
554
|
+
The eval harness in `evals/` tests whether RAG-on explanations are more accurate, not just longer. It triggers 15 deliberately broken Django views, explains each one both ways, and has a separate judge model compare the two against the error's known cause and fix location. The judge doesn't know which explanation used RAG, and their order is randomized.
|
|
555
|
+
|
|
556
|
+
**Results (3 runs, 43 scored comparisons):** RAG-on won 35, RAG-off won 5, and 3 tied.
|
|
557
|
+
|
|
558
|
+
Most of the gap comes from two checks, measured on the 10 fixtures whose cause is in the app's own code (30 comparisons):
|
|
559
|
+
|
|
560
|
+
- **Points to the right file and function:** RAG-on 26, RAG-off 13
|
|
561
|
+
- **Avoids invented details:** RAG-on 26, RAG-off 17
|
|
562
|
+
|
|
563
|
+
Without your source, gpt-4o-mini tends to invent a plausible function name or parameter rather than admit it doesn't know. With the real code in front of it, it mostly doesn't.
|
|
564
|
+
|
|
565
|
+
**Limitations:**
|
|
566
|
+
|
|
567
|
+
- RAG can retrieve the wrong code. In one fixture (`missing_post_key`), it pointed the fix at a template instead of the view.
|
|
568
|
+
- The judge checks claims against the same source RAG-on retrieves from, which may inflate RAG-on's score for avoiding invented details.
|
|
569
|
+
- Claims are spot-checked, not fully audited. All 14 claims flagged on one run held up on manual review, but that is a sample, not proof.
|
|
570
|
+
|
|
571
|
+
Full results, methodology, and how to reproduce (about $1.37 per `--runs 3` pass) are in [evals/README.md](https://github.com/topunix/django-explain-errors/blob/main/evals/README.md).
|
|
580
572
|
|
|
581
573
|
## License
|
|
582
574
|
|
|
583
|
-
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
|
|
575
|
+
This project is licensed under the MIT License. See the [LICENSE](https://github.com/topunix/django-explain-errors/blob/main/LICENSE) file for details.
|
|
584
576
|
|
|
585
577
|
## Contributing
|
|
586
578
|
|
|
@@ -496,41 +496,33 @@ django.db.utils.IntegrityError: NOT NULL constraint failed: blog_post.author_id
|
|
|
496
496
|
|
|
497
497
|
### Does RAG actually help?
|
|
498
498
|
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
of RAG-on's `no_fabrication` advantage may be judge and generator
|
|
523
|
-
overlapping on material RAG-off never sees rather than RAG-on being more
|
|
524
|
-
careful; and claim statuses are spot-checked, not exhaustively audited --
|
|
525
|
-
a script that flagged 14 of 363 claims on one run, all correct on manual
|
|
526
|
-
inspection, is a sample that turned up no false positive, not a proof
|
|
527
|
-
that none exists. Full per-fixture results, the judge prompt, and how to
|
|
528
|
-
reproduce this (about $1.37 for a `--runs 3` pass, most of it judge cost)
|
|
529
|
-
are in [`evals/README.md`](evals/README.md).
|
|
499
|
+
The package can explain an error in two ways:
|
|
500
|
+
|
|
501
|
+
- **RAG-off (default):** the model sees only the Django traceback.
|
|
502
|
+
- **RAG-on:** the model also sees relevant source code from your project, retrieved from a local index.
|
|
503
|
+
|
|
504
|
+
The eval harness in `evals/` tests whether RAG-on explanations are more accurate, not just longer. It triggers 15 deliberately broken Django views, explains each one both ways, and has a separate judge model compare the two against the error's known cause and fix location. The judge doesn't know which explanation used RAG, and their order is randomized.
|
|
505
|
+
|
|
506
|
+
**Results (3 runs, 43 scored comparisons):** RAG-on won 35, RAG-off won 5, and 3 tied.
|
|
507
|
+
|
|
508
|
+
Most of the gap comes from two checks, measured on the 10 fixtures whose cause is in the app's own code (30 comparisons):
|
|
509
|
+
|
|
510
|
+
- **Points to the right file and function:** RAG-on 26, RAG-off 13
|
|
511
|
+
- **Avoids invented details:** RAG-on 26, RAG-off 17
|
|
512
|
+
|
|
513
|
+
Without your source, gpt-4o-mini tends to invent a plausible function name or parameter rather than admit it doesn't know. With the real code in front of it, it mostly doesn't.
|
|
514
|
+
|
|
515
|
+
**Limitations:**
|
|
516
|
+
|
|
517
|
+
- RAG can retrieve the wrong code. In one fixture (`missing_post_key`), it pointed the fix at a template instead of the view.
|
|
518
|
+
- The judge checks claims against the same source RAG-on retrieves from, which may inflate RAG-on's score for avoiding invented details.
|
|
519
|
+
- Claims are spot-checked, not fully audited. All 14 claims flagged on one run held up on manual review, but that is a sample, not proof.
|
|
520
|
+
|
|
521
|
+
Full results, methodology, and how to reproduce (about $1.37 per `--runs 3` pass) are in [evals/README.md](https://github.com/topunix/django-explain-errors/blob/main/evals/README.md).
|
|
530
522
|
|
|
531
523
|
## License
|
|
532
524
|
|
|
533
|
-
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
|
|
525
|
+
This project is licensed under the MIT License. See the [LICENSE](https://github.com/topunix/django-explain-errors/blob/main/LICENSE) file for details.
|
|
534
526
|
|
|
535
527
|
## Contributing
|
|
536
528
|
|
{django_explain_errors-0.9.2 → django_explain_errors-0.9.3/django_explain_errors.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: django-explain-errors
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.3
|
|
4
4
|
Summary: Django middleware that explains unhandled exceptions in DEBUG using an LLM, optionally grounded in your own project source via a local vector index. Works with OpenAI, Claude, or any OpenAI-compatible endpoint including local models.
|
|
5
5
|
Home-page: https://github.com/topunix/django-explain-errors
|
|
6
6
|
Author: topunix
|
|
@@ -546,41 +546,33 @@ django.db.utils.IntegrityError: NOT NULL constraint failed: blog_post.author_id
|
|
|
546
546
|
|
|
547
547
|
### Does RAG actually help?
|
|
548
548
|
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
of RAG-on's `no_fabrication` advantage may be judge and generator
|
|
573
|
-
overlapping on material RAG-off never sees rather than RAG-on being more
|
|
574
|
-
careful; and claim statuses are spot-checked, not exhaustively audited --
|
|
575
|
-
a script that flagged 14 of 363 claims on one run, all correct on manual
|
|
576
|
-
inspection, is a sample that turned up no false positive, not a proof
|
|
577
|
-
that none exists. Full per-fixture results, the judge prompt, and how to
|
|
578
|
-
reproduce this (about $1.37 for a `--runs 3` pass, most of it judge cost)
|
|
579
|
-
are in [`evals/README.md`](evals/README.md).
|
|
549
|
+
The package can explain an error in two ways:
|
|
550
|
+
|
|
551
|
+
- **RAG-off (default):** the model sees only the Django traceback.
|
|
552
|
+
- **RAG-on:** the model also sees relevant source code from your project, retrieved from a local index.
|
|
553
|
+
|
|
554
|
+
The eval harness in `evals/` tests whether RAG-on explanations are more accurate, not just longer. It triggers 15 deliberately broken Django views, explains each one both ways, and has a separate judge model compare the two against the error's known cause and fix location. The judge doesn't know which explanation used RAG, and their order is randomized.
|
|
555
|
+
|
|
556
|
+
**Results (3 runs, 43 scored comparisons):** RAG-on won 35, RAG-off won 5, and 3 tied.
|
|
557
|
+
|
|
558
|
+
Most of the gap comes from two checks, measured on the 10 fixtures whose cause is in the app's own code (30 comparisons):
|
|
559
|
+
|
|
560
|
+
- **Points to the right file and function:** RAG-on 26, RAG-off 13
|
|
561
|
+
- **Avoids invented details:** RAG-on 26, RAG-off 17
|
|
562
|
+
|
|
563
|
+
Without your source, gpt-4o-mini tends to invent a plausible function name or parameter rather than admit it doesn't know. With the real code in front of it, it mostly doesn't.
|
|
564
|
+
|
|
565
|
+
**Limitations:**
|
|
566
|
+
|
|
567
|
+
- RAG can retrieve the wrong code. In one fixture (`missing_post_key`), it pointed the fix at a template instead of the view.
|
|
568
|
+
- The judge checks claims against the same source RAG-on retrieves from, which may inflate RAG-on's score for avoiding invented details.
|
|
569
|
+
- Claims are spot-checked, not fully audited. All 14 claims flagged on one run held up on manual review, but that is a sample, not proof.
|
|
570
|
+
|
|
571
|
+
Full results, methodology, and how to reproduce (about $1.37 per `--runs 3` pass) are in [evals/README.md](https://github.com/topunix/django-explain-errors/blob/main/evals/README.md).
|
|
580
572
|
|
|
581
573
|
## License
|
|
582
574
|
|
|
583
|
-
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
|
|
575
|
+
This project is licensed under the MIT License. See the [LICENSE](https://github.com/topunix/django-explain-errors/blob/main/LICENSE) file for details.
|
|
584
576
|
|
|
585
577
|
## Contributing
|
|
586
578
|
|
|
@@ -10,7 +10,7 @@ with open('README.md', encoding='utf-8') as f:
|
|
|
10
10
|
|
|
11
11
|
setup(
|
|
12
12
|
name='django-explain-errors',
|
|
13
|
-
version='0.9.
|
|
13
|
+
version='0.9.3',
|
|
14
14
|
packages=find_packages(exclude=['tests', 'tests.*', 'evals', 'evals.*']),
|
|
15
15
|
description='Django middleware that explains unhandled exceptions in DEBUG using an LLM, optionally grounded in your own project source via a local vector index. Works with OpenAI, Claude, or any OpenAI-compatible endpoint including local models.',
|
|
16
16
|
long_description_content_type='text/markdown',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{django_explain_errors-0.9.2 → django_explain_errors-0.9.3}/explain_errors/management/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|