Skip to main content

A Python library for content review, correction, and improvement in LLM applications.

Project description

fabricatio-improve

A Python library for content review, correction, and improvement in LLM applications.

📦 Installation

This package is part of the fabricatio monorepo and can be installed as an optional dependency:

pip install fabricatio[improve]

Or install all components:

pip install fabricatio[full]

🔍 Overview

Provides tools for:

  • Content review and problem detection
  • Problem-solution pair generation
  • Text correction and refinement
  • Improvement prioritization based on severity
  • Interactive feedback loops with users

Built on top of Fabricatio's agent framework with support for asynchronous execution.

🧩 Usage Example

from fabricatio_improve.capabilities.correct import Correct
from fabricatio_improve.models.improve import Improvement
from fabricatio_improve.models.problem import Problem, Solution


async def improve_content():
    # Initialize corrector
    corrector = Correct()

    # Sample problematic text
    text = "Ths txt has many speling erors."

    # Get improvement suggestions
    improvement: Improvement = await corrector.correct(text)

    print(f"Found {len(improvement.problem_solutions)} issues:")
    for ps in improvement.problem_solutions:
        print(f"\nProblem: {ps.problem.description}")
        print(f"Location: {ps.problem.location}")
        print(f"Severity: {ps.problem.severity_level}/10")
        print(f"Solution: {ps.solution.description}")
        print(f"Steps: {', '.join(ps.solution.execute_steps)}")

📁 Structure

fabricatio-improve/
├── capabilities/     - Core improvement functionality
│   ├── correct.py    - Text correction capabilities
│   └── review.py     - Content review capabilities
└── models/           - Data models for improvements
    ├── improve.py    - Improvement result model
    ├── kwargs_types.py - Validation argument types
    └── problem.py    - Problem-solution pair definitions

🔗 Dependencies

Built on top of other Fabricatio modules:

  • fabricatio-core - Core interfaces and utilities
  • fabricatio-capabilities - Base capability patterns

📄 License

MIT – see LICENSE

GitHub: github.com/Whth/fabricatio

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fabricatio_improve-0.1.1.dev2-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file fabricatio_improve-0.1.1.dev2-py3-none-any.whl.

File metadata

File hashes

Hashes for fabricatio_improve-0.1.1.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 28642ef021a76b6adaf95f96a75699752c4d59e2a6ba29eca7c6728a0ad7b26f
MD5 e804841b8c1aeaae40fb17f576a7fa69
BLAKE2b-256 173fdb704a1150d0de8bf54b719fb57e2435751e1c0e50fabc5d227fbe1f4dd6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page