Name | isozero JSON |
Version |
0.1.0
JSON |
| download |
home_page | https://github.com/iso-ai/isozero |
Summary | Enhance LLM Zero-Shot Responses through multi-step reasoning and document analysis |
upload_time | 2024-09-06 03:12:24 |
maintainer | None |
docs_url | None |
author | Jazmia Henry |
requires_python | >=3.7 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# IsoZero: Enhancing LLM Zero-Shot Responses
IsoZero is a powerful SDK designed to enhance Large Language Model (LLM) zero-shot responses through multi-step reasoning and document analysis. By leveraging a step-by-step reasoning process, this SDK helps improve the accuracy and depth of LLM outputs, especially in scenarios where the model hasn't been specifically fine-tuned for the task at hand.
## Features
- Multi-step reasoning process to break down complex tasks
- Support for multiple LLM backends:
- Claude (Anthropic)
- GPT (OpenAI)
- Transformer models (Hugging Face)
- Document analysis capabilities for context-aware responses
- Mathematical problem-solving simulation
- Flexible CLI with progress bars and result saving
- Customizable number of reasoning steps
## Package Structure
The IsoZero package consists of two main modules:
1. `reason_sim`: General reasoning and document analysis
2. `math_sim`: Mathematical problem-solving simulation
## Installation
Install IsoZero directly from PyPI:
```bash
pip install isozero
```
For the latest development version:
```bash
pip install git+https://github.com/iso-ai/isozero.git
```
## Usage
### Command Line Interface
IsoZero provides a flexible CLI for various tasks:
1. General Reasoning Task:
```bash
isozero --mode reasoning --task "Explain the process of photosynthesis" --agent claude --steps 4 --save
```
2. Document Analysis (Question Answering):
```bash
isozero --mode qa --documents https://en.wikipedia.org/wiki/Artificial_intelligence https://en.wikipedia.org/wiki/Machine_learning --questions questions.txt --agent huggingface --model google/flan-t5-large --steps 4
```
3. Math Problem Solving:
```bash
isozero --mode math --task "A train travels at 60 km/h for 2 hours, then at 90 km/h for 3 hours. What's the total distance?" --agent openai --steps 4 --save
```
The `--save` flag will store the results in a JSON file in the `logs` folder.
### Python API
You can also use IsoZero in your Python scripts:
```python
from isozero.reason_sim import ClaudeAgent, QuestionAnswerer, DocumentLoader
from isozero.reason_sim.reason_simulation import ReasonSimulation
from isozero.reason_sim.simulation_wrapper import SimulationWrapper
# Initialize the agent
agent = ClaudeAgent(api_key="your_api_key_here")
# For reasoning tasks
simulation = ReasonSimulation("Explain the process of photosynthesis", max_steps=4)
wrapper = SimulationWrapper(agent, simulation)
for step in range(4):
state = wrapper.step()
print(f"Step {state['text_data']['step']}:", state['text_data']['reasoning'][-1])
# For document analysis
loader = DocumentLoader()
documents = loader.load(["path/to/document.txt"])
qa = QuestionAnswerer(agent)
results = qa.answer_questions(documents, ["Your question here"])
```
## Configuration
Set environment variables for API keys:
```bash
export ANTHROPIC_API_KEY=your_anthropic_key_here
export OPENAI_API_KEY=your_openai_key_here
```
Or use a `.env` file in your project root.
## License
This project is licensed under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for details.
## Citation
If you use IsoZero in your research, please cite it as follows:
```
@software{isozero2024,
author = {Jazmia Henry},
title = {IsoZero: Enhancing LLM Zero-Shot Responses},
year = {2024},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/iso-ai/isozero}}
}
```
Raw data
{
"_id": null,
"home_page": "https://github.com/iso-ai/isozero",
"name": "isozero",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": null,
"author": "Jazmia Henry",
"author_email": "jazmiahenry@example.com",
"download_url": "https://files.pythonhosted.org/packages/3d/74/ac22b61b839b1d13133b252639fb0f6e60a7f562e3aa01ab39f607d3aa3a/isozero-0.1.0.tar.gz",
"platform": null,
"description": "# IsoZero: Enhancing LLM Zero-Shot Responses\n\nIsoZero is a powerful SDK designed to enhance Large Language Model (LLM) zero-shot responses through multi-step reasoning and document analysis. By leveraging a step-by-step reasoning process, this SDK helps improve the accuracy and depth of LLM outputs, especially in scenarios where the model hasn't been specifically fine-tuned for the task at hand.\n\n## Features\n\n- Multi-step reasoning process to break down complex tasks\n- Support for multiple LLM backends:\n - Claude (Anthropic)\n - GPT (OpenAI)\n - Transformer models (Hugging Face)\n- Document analysis capabilities for context-aware responses\n- Mathematical problem-solving simulation\n- Flexible CLI with progress bars and result saving\n- Customizable number of reasoning steps\n\n## Package Structure\n\nThe IsoZero package consists of two main modules:\n\n1. `reason_sim`: General reasoning and document analysis\n2. `math_sim`: Mathematical problem-solving simulation\n\n## Installation\n\nInstall IsoZero directly from PyPI:\n\n```bash\npip install isozero\n```\n\nFor the latest development version:\n\n```bash\npip install git+https://github.com/iso-ai/isozero.git\n```\n\n## Usage\n\n### Command Line Interface\n\nIsoZero provides a flexible CLI for various tasks:\n\n1. General Reasoning Task:\n ```bash\n isozero --mode reasoning --task \"Explain the process of photosynthesis\" --agent claude --steps 4 --save\n ```\n\n2. Document Analysis (Question Answering):\n ```bash\n isozero --mode qa --documents https://en.wikipedia.org/wiki/Artificial_intelligence https://en.wikipedia.org/wiki/Machine_learning --questions questions.txt --agent huggingface --model google/flan-t5-large --steps 4\n ```\n\n3. Math Problem Solving:\n ```bash\n isozero --mode math --task \"A train travels at 60 km/h for 2 hours, then at 90 km/h for 3 hours. What's the total distance?\" --agent openai --steps 4 --save\n ```\n\nThe `--save` flag will store the results in a JSON file in the `logs` folder.\n\n### Python API\n\nYou can also use IsoZero in your Python scripts:\n\n```python\nfrom isozero.reason_sim import ClaudeAgent, QuestionAnswerer, DocumentLoader\nfrom isozero.reason_sim.reason_simulation import ReasonSimulation\nfrom isozero.reason_sim.simulation_wrapper import SimulationWrapper\n\n# Initialize the agent\nagent = ClaudeAgent(api_key=\"your_api_key_here\")\n\n# For reasoning tasks\nsimulation = ReasonSimulation(\"Explain the process of photosynthesis\", max_steps=4)\nwrapper = SimulationWrapper(agent, simulation)\n\nfor step in range(4):\n state = wrapper.step()\n print(f\"Step {state['text_data']['step']}:\", state['text_data']['reasoning'][-1])\n\n# For document analysis\nloader = DocumentLoader()\ndocuments = loader.load([\"path/to/document.txt\"])\nqa = QuestionAnswerer(agent)\nresults = qa.answer_questions(documents, [\"Your question here\"])\n```\n\n## Configuration\n\nSet environment variables for API keys:\n\n```bash\nexport ANTHROPIC_API_KEY=your_anthropic_key_here\nexport OPENAI_API_KEY=your_openai_key_here\n```\n\nOr use a `.env` file in your project root.\n\n## License\n\nThis project is licensed under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for details.\n\n## Citation\n\nIf you use IsoZero in your research, please cite it as follows:\n\n```\n@software{isozero2024,\n author = {Jazmia Henry},\n title = {IsoZero: Enhancing LLM Zero-Shot Responses},\n year = {2024},\n publisher = {GitHub},\n journal = {GitHub repository},\n howpublished = {\\url{https://github.com/iso-ai/isozero}}\n}\n```\n\n\n",
"bugtrack_url": null,
"license": null,
"summary": "Enhance LLM Zero-Shot Responses through multi-step reasoning and document analysis",
"version": "0.1.0",
"project_urls": {
"Homepage": "https://github.com/iso-ai/isozero"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "840ceeeee5f743282f3f1abfc5f231e32158e315d843308891077f28a8df7679",
"md5": "a338db5b6cf8f0c771d2672761893be4",
"sha256": "579b4f7517159186a286ece22a8b923b472ffff3eb26ee6d5b2b4ea4aa48a509"
},
"downloads": -1,
"filename": "isozero-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a338db5b6cf8f0c771d2672761893be4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 25513,
"upload_time": "2024-09-06T03:12:22",
"upload_time_iso_8601": "2024-09-06T03:12:22.903270Z",
"url": "https://files.pythonhosted.org/packages/84/0c/eeeee5f743282f3f1abfc5f231e32158e315d843308891077f28a8df7679/isozero-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3d74ac22b61b839b1d13133b252639fb0f6e60a7f562e3aa01ab39f607d3aa3a",
"md5": "1c60cb996d03fb29d04ee51b8ecc0f8f",
"sha256": "e54e423fd096e385e199ee4fc3f143b11455587e122e5061638aa834a1f4569b"
},
"downloads": -1,
"filename": "isozero-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "1c60cb996d03fb29d04ee51b8ecc0f8f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 18762,
"upload_time": "2024-09-06T03:12:24",
"upload_time_iso_8601": "2024-09-06T03:12:24.556903Z",
"url": "https://files.pythonhosted.org/packages/3d/74/ac22b61b839b1d13133b252639fb0f6e60a7f562e3aa01ab39f607d3aa3a/isozero-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-06 03:12:24",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "iso-ai",
"github_project": "isozero",
"github_not_found": true,
"lcname": "isozero"
}