Name | blogus JSON |
Version |
0.1.0
JSON |
| download |
home_page | None |
Summary | A library for crafting, analyzing, and perfecting AI prompts |
upload_time | 2025-08-22 11:21:55 |
maintainer | None |
docs_url | None |
author | Dipankar Sarkar |
requires_python | <4.0,>=3.11 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Blogus: Craft, Analyze, and Perfect Your AI Prompts

[](https://opensource.org/licenses/MIT)
[](https://badge.fury.io/py/blogus)
[](http://makeapullrequest.com)
## Why Blogus?
In the rapidly evolving field of AI and large language models, crafting effective prompts has become a crucial skill. Blogus is born out of the need for a sophisticated, user-friendly tool that empowers developers, researchers, and AI enthusiasts to:
- Analyze and refine prompts in real-time
- Generate and manage test cases
- Execute prompts across multiple AI models
- Visualize and understand prompt effectiveness
- Separate target models (for execution) from judge models (for analysis)
- Manage the complete prompt development lifecycle
Whether you're a seasoned prompt engineer or just starting your journey with AI, Blogus provides the tools you need to elevate your prompt crafting skills.
## What is Blogus?
Blogus is an advanced prompt engineering tool available as:
1. **A Python library** for programmatic use in your applications
2. **A command-line interface** for quick analysis and testing
3. **A web interface** with an intuitive frontend for interactive prompt engineering
Key features include:
- **Real-time Prompt Analysis**: Get instant feedback on your prompts' effectiveness and alignment with your goals.
- **Multi-model Support**: Test your prompts across various AI models, including GPT-4, Claude, and more.
- **Test Case Generation**: Automatically generate relevant test cases for your prompts.
- **Interactive Code Editor**: A feature-rich editor with syntax highlighting and real-time analysis feedback (in web UI).
- **Execution Environment**: Run your prompts and see the results immediately.
- **Test Case Management**: Store and download generated test cases as JSON files (in web UI).
- **Dynamic Goal Inference**: Automatically infer the goal of your prompt if not provided.
- **Target vs Judge Models**: Separate models for prompt execution and analysis for optimal cost and performance.
- **Complete Prompt Lifecycle**: Tools for the entire prompt engineering workflow from creation to optimization.
## Documentation
Comprehensive documentation is available in the [docs](docs/) directory:
- [Getting Started](docs/getting_started.md) - Installation and basic setup
- [Core Concepts](docs/core_concepts.md) - Understanding the fundamentals of Blogus
- [Prompt Development Lifecycle](docs/prompt_lifecycle.md) - Complete workflow for prompt engineering
- [Command Line Interface](docs/cli.md) - Using Blogus from the command line
- [Web Interface](docs/web_interface.md) - Using the web-based interface
- [Library Usage](docs/library.md) - Integrating Blogus into your Python applications
- [Model Selection](docs/models.md) - Choosing the right models for your tasks
- [Advanced Features](docs/advanced.md) - Advanced techniques and workflows
- [API Reference](docs/api/) - Detailed API documentation
- [Contributing](docs/contributing.md) - How to contribute to Blogus
## Examples
Check out the [examples](examples/) directory for practical usage examples:
- [Basic Analysis](examples/basic_analysis.py) - Simple prompt analysis and execution
- [Test Generation](examples/test_generation.py) - Generating test cases for parameterized prompts
- [Cross-Model Comparison](examples/cross_model.py) - Comparing prompt responses across different models
## Installation
```bash
pip install blogus
```
For web interface support, install with the web extra:
```bash
pip install blogus[web]
```
## Usage
### As a Library
```python
from blogus.core import TargetLLMModel, JudgeLLMModel, analyze_prompt, generate_test
prompt = "You are an AI assistant that helps people find information..."
# Analyze a prompt using a judge model
analysis = analyze_prompt(prompt, JudgeLLMModel.GPT_4)
print(f"Goal alignment: {analysis.overall_goal_alignment}/10")
# Generate a test case using a judge model
test_case = generate_test(prompt, JudgeLLMModel.GPT_4)
# Execute a prompt using a target model
result = execute_prompt(prompt, TargetLLMModel.GPT_4)
```
### Command Line Interface
```bash
# Analyze a prompt with separate target and judge models
blogus analyze "You are an AI assistant that helps people find information..." \\
--target-model gpt-4o \\
--judge-model claude-3-opus-20240229
# Generate a test case with separate target and judge models
blogus test "You are an AI assistant that helps people find information..." \\
--target-model gpt-4o \\
--judge-model claude-3-opus-20240229
# Execute a prompt with a target model
blogus execute "You are an AI assistant that helps people find information..." \\
--target-model gpt-4o
# Infer the goal of a prompt with a judge model
blogus goal "You are an AI assistant that helps people find information..." \\
--judge-model claude-3-opus-20240229
# See all available commands
blogus --help
```
### Web Interface
To run the web interface:
```bash
blogus-web # If installed with web extras
# or
python -m blogus.web
```
Then navigate to `http://localhost:8000` in your browser.
## API Keys
Logus uses LiteLLM to support a wide range of AI models. You'll need API keys for the models you want to use:
- OpenAI API key for GPT models
- Anthropic API key for Claude models
- Groq API key for Mixtral/Llama models
Set these as environment variables:
```bash
export OPENAI_API_KEY=your_openai_api_key
export ANTHROPIC_API_KEY=your_anthropic_api_key
export GROQ_API_KEY=your_groq_api_key
```
For other models supported by LiteLLM, please refer to the [LiteLLM documentation](https://docs.litellm.ai/docs/) for the required environment variables.
## Contributing
We welcome contributions to Blogus! Please see our [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to get started.
## License
Logus is open-source software licensed under the MIT license. See the [LICENSE](LICENSE) file for more details.
## Support
If you encounter any issues or have questions, please file an issue on our [GitHub issue tracker](https://github.com/terraprompt/blogus/issues).
## Citation
If you use Logus in your research, please cite it as follows:
```bibtex
@article{sarkar2024blogus,
title={Blogus: An Advanced Tool for Crafting, Analyzing, and Perfecting AI Prompts},
author={Sarkar, Dipankar},
journal={arXiv preprint arXiv:2024.xxxxx},
year={2024},
url={https://github.com/terraprompt/blogus},
note={Software available from https://github.com/terraprompt/blogus},
abstract={Blogus is an open-source software tool designed to facilitate the
process of prompt engineering for large language models. It provides
real-time analysis of prompts, supports multiple AI models, and offers
features for test case generation and prompt execution. This tool aims to
enhance the efficiency and effectiveness of prompt crafting in AI research
and applications.}
}
```
For LaTeX users, you can use the following command to cite Blogus:
```latex
\cite{sarkar2024blogus}
```
---
Happy Prompt Engineering with Blogus! 🚀
Raw data
{
"_id": null,
"home_page": null,
"name": "blogus",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.11",
"maintainer_email": null,
"keywords": null,
"author": "Dipankar Sarkar",
"author_email": "me@dipankar.name",
"download_url": "https://files.pythonhosted.org/packages/e5/18/eaa98df3b7e0273ef935895a8822bd4845bdbc11b603adf71e24d3cac3e5/blogus-0.1.0.tar.gz",
"platform": null,
"description": "# Blogus: Craft, Analyze, and Perfect Your AI Prompts\n\n\n\n[](https://opensource.org/licenses/MIT)\n[](https://badge.fury.io/py/blogus)\n[](http://makeapullrequest.com)\n\n## Why Blogus?\n\nIn the rapidly evolving field of AI and large language models, crafting effective prompts has become a crucial skill. Blogus is born out of the need for a sophisticated, user-friendly tool that empowers developers, researchers, and AI enthusiasts to:\n\n- Analyze and refine prompts in real-time\n- Generate and manage test cases\n- Execute prompts across multiple AI models\n- Visualize and understand prompt effectiveness\n- Separate target models (for execution) from judge models (for analysis)\n- Manage the complete prompt development lifecycle\n\nWhether you're a seasoned prompt engineer or just starting your journey with AI, Blogus provides the tools you need to elevate your prompt crafting skills.\n\n## What is Blogus?\n\nBlogus is an advanced prompt engineering tool available as:\n1. **A Python library** for programmatic use in your applications\n2. **A command-line interface** for quick analysis and testing\n3. **A web interface** with an intuitive frontend for interactive prompt engineering\n\nKey features include:\n\n- **Real-time Prompt Analysis**: Get instant feedback on your prompts' effectiveness and alignment with your goals.\n- **Multi-model Support**: Test your prompts across various AI models, including GPT-4, Claude, and more.\n- **Test Case Generation**: Automatically generate relevant test cases for your prompts.\n- **Interactive Code Editor**: A feature-rich editor with syntax highlighting and real-time analysis feedback (in web UI).\n- **Execution Environment**: Run your prompts and see the results immediately.\n- **Test Case Management**: Store and download generated test cases as JSON files (in web UI).\n- **Dynamic Goal Inference**: Automatically infer the goal of your prompt if not provided.\n- **Target vs Judge Models**: Separate models for prompt execution and analysis for optimal cost and performance.\n- **Complete Prompt Lifecycle**: Tools for the entire prompt engineering workflow from creation to optimization.\n\n## Documentation\n\nComprehensive documentation is available in the [docs](docs/) directory:\n\n- [Getting Started](docs/getting_started.md) - Installation and basic setup\n- [Core Concepts](docs/core_concepts.md) - Understanding the fundamentals of Blogus\n- [Prompt Development Lifecycle](docs/prompt_lifecycle.md) - Complete workflow for prompt engineering\n- [Command Line Interface](docs/cli.md) - Using Blogus from the command line\n- [Web Interface](docs/web_interface.md) - Using the web-based interface\n- [Library Usage](docs/library.md) - Integrating Blogus into your Python applications\n- [Model Selection](docs/models.md) - Choosing the right models for your tasks\n- [Advanced Features](docs/advanced.md) - Advanced techniques and workflows\n- [API Reference](docs/api/) - Detailed API documentation\n- [Contributing](docs/contributing.md) - How to contribute to Blogus\n\n## Examples\n\nCheck out the [examples](examples/) directory for practical usage examples:\n\n- [Basic Analysis](examples/basic_analysis.py) - Simple prompt analysis and execution\n- [Test Generation](examples/test_generation.py) - Generating test cases for parameterized prompts\n- [Cross-Model Comparison](examples/cross_model.py) - Comparing prompt responses across different models\n\n## Installation\n\n```bash\npip install blogus\n```\n\nFor web interface support, install with the web extra:\n```bash\npip install blogus[web]\n```\n\n## Usage\n\n### As a Library\n\n```python\nfrom blogus.core import TargetLLMModel, JudgeLLMModel, analyze_prompt, generate_test\n\nprompt = \"You are an AI assistant that helps people find information...\"\n\n# Analyze a prompt using a judge model\nanalysis = analyze_prompt(prompt, JudgeLLMModel.GPT_4)\nprint(f\"Goal alignment: {analysis.overall_goal_alignment}/10\")\n\n# Generate a test case using a judge model\ntest_case = generate_test(prompt, JudgeLLMModel.GPT_4)\n\n# Execute a prompt using a target model\nresult = execute_prompt(prompt, TargetLLMModel.GPT_4)\n```\n\n### Command Line Interface\n\n```bash\n# Analyze a prompt with separate target and judge models\nblogus analyze \"You are an AI assistant that helps people find information...\" \\\\\n --target-model gpt-4o \\\\\n --judge-model claude-3-opus-20240229\n\n# Generate a test case with separate target and judge models\nblogus test \"You are an AI assistant that helps people find information...\" \\\\\n --target-model gpt-4o \\\\\n --judge-model claude-3-opus-20240229\n\n# Execute a prompt with a target model\nblogus execute \"You are an AI assistant that helps people find information...\" \\\\\n --target-model gpt-4o\n\n# Infer the goal of a prompt with a judge model\nblogus goal \"You are an AI assistant that helps people find information...\" \\\\\n --judge-model claude-3-opus-20240229\n\n# See all available commands\nblogus --help\n```\n\n### Web Interface\n\nTo run the web interface:\n```bash\nblogus-web # If installed with web extras\n# or\npython -m blogus.web\n```\n\nThen navigate to `http://localhost:8000` in your browser.\n\n## API Keys\n\nLogus uses LiteLLM to support a wide range of AI models. You'll need API keys for the models you want to use:\n\n- OpenAI API key for GPT models\n- Anthropic API key for Claude models\n- Groq API key for Mixtral/Llama models\n\nSet these as environment variables:\n```bash\nexport OPENAI_API_KEY=your_openai_api_key\nexport ANTHROPIC_API_KEY=your_anthropic_api_key\nexport GROQ_API_KEY=your_groq_api_key\n```\n\nFor other models supported by LiteLLM, please refer to the [LiteLLM documentation](https://docs.litellm.ai/docs/) for the required environment variables.\n\n## Contributing\n\nWe welcome contributions to Blogus! Please see our [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to get started.\n\n## License\n\nLogus is open-source software licensed under the MIT license. See the [LICENSE](LICENSE) file for more details.\n\n## Support\n\nIf you encounter any issues or have questions, please file an issue on our [GitHub issue tracker](https://github.com/terraprompt/blogus/issues).\n\n## Citation\n\nIf you use Logus in your research, please cite it as follows:\n\n```bibtex\n@article{sarkar2024blogus,\n title={Blogus: An Advanced Tool for Crafting, Analyzing, and Perfecting AI Prompts},\n author={Sarkar, Dipankar},\n journal={arXiv preprint arXiv:2024.xxxxx},\n year={2024},\n url={https://github.com/terraprompt/blogus},\n note={Software available from https://github.com/terraprompt/blogus},\n abstract={Blogus is an open-source software tool designed to facilitate the\n process of prompt engineering for large language models. It provides\n real-time analysis of prompts, supports multiple AI models, and offers\n features for test case generation and prompt execution. This tool aims to\n enhance the efficiency and effectiveness of prompt crafting in AI research\n and applications.}\n}\n```\n\nFor LaTeX users, you can use the following command to cite Blogus:\n\n```latex\n\\cite{sarkar2024blogus}\n```\n\n---\n\nHappy Prompt Engineering with Blogus! \ud83d\ude80\n\n",
"bugtrack_url": null,
"license": null,
"summary": "A library for crafting, analyzing, and perfecting AI prompts",
"version": "0.1.0",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "ae941b6d8c9f02765476dfb1ba5c765d4163b3e008b4a7122ec06509f2fd26ef",
"md5": "a967a1d707b7bab1eeb4c16f92952241",
"sha256": "f8616804bf8a1ef41d973389fbe50d60b896bce620e9983fce07d5ec3170b017"
},
"downloads": -1,
"filename": "blogus-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a967a1d707b7bab1eeb4c16f92952241",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.11",
"size": 13583,
"upload_time": "2025-08-22T11:21:54",
"upload_time_iso_8601": "2025-08-22T11:21:54.181899Z",
"url": "https://files.pythonhosted.org/packages/ae/94/1b6d8c9f02765476dfb1ba5c765d4163b3e008b4a7122ec06509f2fd26ef/blogus-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "e518eaa98df3b7e0273ef935895a8822bd4845bdbc11b603adf71e24d3cac3e5",
"md5": "57cafb6081b86179cb107774c0eee486",
"sha256": "006d59f9f3be44fe06baa2d7f28f41b4507f20819ea2ca13d96692030af27128"
},
"downloads": -1,
"filename": "blogus-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "57cafb6081b86179cb107774c0eee486",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.11",
"size": 13868,
"upload_time": "2025-08-22T11:21:55",
"upload_time_iso_8601": "2025-08-22T11:21:55.682393Z",
"url": "https://files.pythonhosted.org/packages/e5/18/eaa98df3b7e0273ef935895a8822bd4845bdbc11b603adf71e24d3cac3e5/blogus-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-22 11:21:55",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "blogus"
}