Skip to content

Commit ca4c435

Browse files
pjoshi30Preetam Joshi
andauthored
New SDK to support AIMon's end-to-end product experience (#2)
* Fully featured SDK that supports AIMon's end-to-end product experience * Supports async analysis leveraging AIMon's APIs * Support for evaluation dataset management --------- Co-authored-by: Preetam Joshi <info@aimon.ai>
1 parent 0b0c34b commit ca4c435

24 files changed

+1078
-148
lines changed

.github/workflows/publish.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish Python Package
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v2
13+
14+
- name: Set up Python
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: '3.x'
18+
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install setuptools wheel twine
23+
24+
- name: Build package
25+
run: |
26+
python setup.py sdist bdist_wheel
27+
28+
- name: Publish package
29+
env:
30+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
31+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
32+
run: |
33+
twine upload dist/*

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include README.md
2+
include LICENSE

README.md

Lines changed: 34 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
# 🎉**Welcome to Aimon Rely**
1+
# 🎉**Welcome to AIMon Rely**
22

3-
Aimon Rely is a state-of-the-art, multi-model system for detecting LLM quality issues both offline and online. Our
4-
Hallucination detector performs well on the popular industry benchmarks. It is available via a convenient hosted API
5-
(currently in beta).
3+
AIMon Rely is a state-of-the-art system consisting of multiple models for detecting LLM quality issues during offline evaluations and continuous production monitoring. We offer
4+
hallucination metrics that is fast, reliable and cost-effective. We also support additional metrics such as
5+
completeness, conciseness and toxicity.
66

77
Read our [blog post](https://aimon.ai/blogs/introducing-rely) for more details.
88

9-
**Join our [discord](https://discord.gg/Cp6YZ9qTdm) or reach out to us at info@aimon.ai to get your API key.**
9+
**Join our community on [Slack](https://join.slack.com/t/generativeair/shared_invite/zt-2jab62lsj-xM9a_s~Qweu8lf3YS2cANg)
10+
or reach out to us at info@aimon.ai to get your API key.**
1011

1112
<div align="center">
12-
<img src="images/aimon-rely-image.png" alt="Aimon Rely" width="550" height="450">
13+
<img src="images/aimon-rely-image.png" alt="AIMon Rely" width="550" height="450">
1314
</div>
1415

1516
## Metrics Supported
@@ -28,31 +29,38 @@ available in a future release.
2829
| Coherence | <span style="font-size: 24px;">⌛</span> |
2930
| Sensitive Data (PII/PHI/PCI) | <span style="font-size: 24px;">⌛</span> |
3031

31-
## Quick Usage
32+
## Product
3233

33-
### Sandbox
34+
Follow these steps to use the product:
3435

35-
You can play with a [Sandbox](https://aimon.ai/tryproduct) that is available on our website.
36+
- Step 1: Get access to the beta product by joining the wait list on our [website](https://aimon.ai/) or by requesting
37+
it on [Slack](https://join.slack.com/t/generativeair/shared_invite/zt-2jab62lsj-xM9a_s~Qweu8lf3YS2cANg) or
38+
sending an email to info@aimon.ai
39+
- Step 2: Install the AIMon SDK by running `pip install aimon` in your terminal.
40+
- Step 3: Refer to the [sample notebook](notebooks/aimon_sdk_langchain_summarization.ipynb) for an example of how to instrument an LLM application using our SDK.
41+
42+
<div align="center">
43+
<img src="images/product_apps_page.png" alt="AIMon Product">
44+
</div>
3645

37-
### API
46+
## API
3847

39-
Here is how to try the API:
48+
Steps to use the API:
4049

41-
- Step 1: Get your API key by requesting it on our [discord](https://discord.gg/Cp6YZ9qTdm) or sending an email
50+
- Step 1: Get your API key by requesting it on our [Slack](https://join.slack.com/t/generativeair/shared_invite/zt-2jab62lsj-xM9a_s~Qweu8lf3YS2cANg) or sending an email
4251
to info@aimon.ai
4352
- Step 2: You can try the API using either of these methods
44-
- [OPTION 1] Try the simple langchain summarization application that is augmented with Aimon Rely to detect
53+
- [OPTION 1] Try the simple langchain summarization application that is augmented with AIMon Rely to detect
4554
hallucinations at the sentence level.
46-
- Step 1: Run `cd src`, `pip install -r requirements.txt && python setup.py install`
47-
- Step 2: Run `cd ..`, `streamlit run src/examples/langchain_summarization_app.py`
55+
- Step 1: Run `pip install -r examples/requirements.txt && pip install aimon`
56+
- Step 2: Run `streamlit run examples/langchain_summarization_app.py`
4857
- [OPTION 2] Download the Postman collection specified below to access the API
4958
- Model Hallucination (Passage and Sentence
50-
Level): [Postman Collection](postman_collections/aimon_apis_beta.postman_collection.may_2024.json)
59+
Level): [Postman Collection](examples/postman_collections)
5160

52-
**This GIF demonstrates a simple langchain based document summarization application that is augmented with Aimon Rely
53-
to demonstrate the ease of integration.**
61+
### Sandbox
5462

55-
![Simple Langchain App with Aimon Rely](images/aimon-rely-app-example.gif)
63+
You can play with a [Sandbox](https://aimon.ai/tryproduct) that is available on our website.
5664

5765
## Benchmarks
5866

@@ -62,15 +70,15 @@ hallucination detection task. The table below shows our results.
6270

6371
A few key takeaways:
6472

65-
Aimon Rely is **10x cheaper** than GPT-4 Turbo.
73+
AIMon Rely is **10x cheaper** than GPT-4 Turbo.
6674

67-
Aimon Rely is **4x faster** than GPT-4 Turbo.
75+
AIMon Rely is **4x faster** than GPT-4 Turbo.
6876

69-
Aimon Rely provides the convenience of a fully hosted API that includes baked-in explainability.
77+
AIMon Rely provides the convenience of a fully hosted API that includes baked-in explainability.
7078

7179
✅ Support for a context length of up to 32,000 tokens (with plans to further expand this in the near future).
7280

73-
Overall, Aimon Rely is 10 times cheaper, 4 times faster and close to or even **better than GPT-4** on the benchmarks
81+
Overall, AIMon Rely is 10 times cheaper, 4 times faster and close to or even **better than GPT-4** on the benchmarks
7482
making it a suitable choice for both offline and online detection of hallucinations.
7583

7684
<div align="center">
@@ -79,26 +87,17 @@ making it a suitable choice for both offline and online detection of hallucinati
7987

8088
### Completeness, Conciseness Detection
8189

82-
There is a lack of industry standard benchmark datasets here. We will be publishing an evaluation dataset soon.
90+
There is a lack of industry standard benchmark datasets for these metrics. We will be publishing an evaluation dataset soon.
8391
Stay Tuned! <span style="font-size: 16px;">⌛</span>
8492

8593
## Pricing
8694

87-
We offer a generous free tier and an attractive low cost, low latency API.
88-
89-
### Model Hallucination (Passage and Sentence Level)
90-
91-
*Only the input payload is used for pricing calculations.*
92-
93-
| Number of tokens | Price per 1M tokens |
94-
|----------------------------|---------------------|
95-
| First 5M tokens | **FREE** |
96-
| Subsequent price/1M tokens | $1 |
95+
Please reach out to info@aimon.ai for pricing details related to the product and the API.
9796

9897
## Future Work
9998

10099
- We are working on additional metrics as detailed in the table above.
101100
- In addition, we are working on something awesome to make the offline evaluation and continuous model quality
102101
monitoring experience more seamless.
103102

104-
Join our [discord](https://discord.gg/Cp6YZ9qTdm) for the latest updates and discussions on generative AI reliability.
103+
Join our [Slack](https://join.slack.com/t/generativeair/shared_invite/zt-2jab62lsj-xM9a_s~Qweu8lf3YS2cANg) for the latest updates and discussions on generative AI reliability.

aimon/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from .client import Client
2+
from .dataset import Dataset, DatasetCollection, DatasetRecord
3+
from .evaluation import Evaluation, Run
4+
from .models import MLModel
5+
from .simple_client import SimpleAimonRelyClient
6+
from .metrics_config import Config
7+
from .utils import InvalidAPIKeyError

0 commit comments

Comments
 (0)