arize-phoenix 0.0.39__py3-none-any.whl → 0.0.41__py3-none-any.whl
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.
Potentially problematic release.
This version of arize-phoenix might be problematic. Click here for more details.
- {arize_phoenix-0.0.39.dist-info → arize_phoenix-0.0.41.dist-info}/METADATA +13 -12
- {arize_phoenix-0.0.39.dist-info → arize_phoenix-0.0.41.dist-info}/RECORD +14 -13
- phoenix/__init__.py +1 -1
- phoenix/core/traces.py +1 -1
- phoenix/experimental/evals/functions/binary.py +8 -0
- phoenix/experimental/evals/retrievals.py +3 -1
- phoenix/server/static/index.js +357 -357
- phoenix/trace/fixtures.py +9 -2
- phoenix/trace/langchain/__init__.py +2 -1
- phoenix/trace/langchain/instrumentor.py +37 -0
- phoenix/trace/llama_index/callback.py +26 -11
- {arize_phoenix-0.0.39.dist-info → arize_phoenix-0.0.41.dist-info}/WHEEL +0 -0
- {arize_phoenix-0.0.39.dist-info → arize_phoenix-0.0.41.dist-info}/licenses/IP_NOTICE +0 -0
- {arize_phoenix-0.0.39.dist-info → arize_phoenix-0.0.41.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: arize-phoenix
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.41
|
|
4
4
|
Summary: ML Observability in your notebook
|
|
5
5
|
Project-URL: Documentation, https://docs.arize.com/phoenix/
|
|
6
6
|
Project-URL: Issues, https://github.com/Arize-ai/phoenix/issues
|
|
@@ -82,16 +82,16 @@ Description-Content-Type: text/markdown
|
|
|
82
82
|
|
|
83
83
|
Phoenix provides MLOps and LLMOps insights at lightning speed with zero-config observability. Phoenix provides a notebook-first experience for monitoring your models and LLM Applications by providing:
|
|
84
84
|
|
|
85
|
-
- **LLM
|
|
85
|
+
- **LLM Traces** - Trace through the execution of your LLM Application to understand the internals of your LLM Application and to troubleshoot problems related to things like retrieval and tool execution.
|
|
86
86
|
- **LLM Evals** - Leverage the power of large language models to evaluate your generative model or application's relevance, toxicity, and more.
|
|
87
87
|
- **Embedding Analysis** - Explore embedding point-clouds and identify clusters of high drift and performance degradation.
|
|
88
|
-
- **RAG
|
|
88
|
+
- **RAG Analysis** - Visualize your generative application's search and retrieval process to solve improve your retrieval-augmented generation.
|
|
89
89
|
- **Structured Data Analysis** - Statistically analyze your structured data by performing A/B analysis, temporal drift analysis, and more.
|
|
90
90
|
|
|
91
91
|
**Table of Contents**
|
|
92
92
|
|
|
93
93
|
- [Installation](#installation)
|
|
94
|
-
- [LLM
|
|
94
|
+
- [LLM Traces](#llm-traces)
|
|
95
95
|
- [Tracing with LlamaIndex](#tracing-with-llamaindex)
|
|
96
96
|
- [Tracing with LangChain](#tracing-with-langchain)
|
|
97
97
|
- [LLM Evals](#llm-evals)
|
|
@@ -99,7 +99,7 @@ Phoenix provides MLOps and LLMOps insights at lightning speed with zero-config o
|
|
|
99
99
|
- [UMAP-based Exploratory Data Analysis](#umap-based-exploratory-data-analysis)
|
|
100
100
|
- [Cluster-driven Drift and Performance Analysis](#cluster-driven-drift-and-performance-analysis)
|
|
101
101
|
- [Exportable Clusters](#exportable-clusters)
|
|
102
|
-
- [
|
|
102
|
+
- [Retrieval-Augmented Generation Analysis](#retrieval-augmented-generation-analysis)
|
|
103
103
|
- [Structured Data Analysis](#structured-data-analysis)
|
|
104
104
|
- [Community](#community)
|
|
105
105
|
- [Thanks](#thanks)
|
|
@@ -119,7 +119,7 @@ Some functionality such as LLM evals are under the `experimental` subpackage.
|
|
|
119
119
|
pip install arize-phoenix[experimental]
|
|
120
120
|
```
|
|
121
121
|
|
|
122
|
-
## LLM
|
|
122
|
+
## LLM Traces
|
|
123
123
|
|
|
124
124
|

|
|
125
125
|
|
|
@@ -129,7 +129,7 @@ With the advent of powerful LLMs, it is now possible to build LLM Applications t
|
|
|
129
129
|
|
|
130
130
|
[](https://colab.research.google.com/github/Arize-ai/phoenix/blob/main/tutorials/tracing/llama_index_tracing_tutorial.ipynb) [](https://github.com/Arize-ai/phoenix/blob/main/tutorials/tracing/llama_index_tracing_tutorial.ipynb)
|
|
131
131
|
|
|
132
|
-

|
|
133
133
|
|
|
134
134
|
To extract traces from your LlamaIndex application, you will have to add Phoenix's `OpenInferenceTraceCallback` to your LlamaIndex application. A callback (in this case an OpenInference `Tracer`) is a class that automatically accumulates `spans` that trac your application as it executes. The OpenInference `Tracer` is a tracer that is specifically designed to work with Phoenix and by default exports the traces to a locally running phoenix server.
|
|
135
135
|
|
|
@@ -199,12 +199,13 @@ import pandas as pd
|
|
|
199
199
|
# Launch phoenix
|
|
200
200
|
session = px.launch_app()
|
|
201
201
|
|
|
202
|
-
# Once you have started a Phoenix server, you can start your LangChain application with the
|
|
202
|
+
# Once you have started a Phoenix server, you can start your LangChain application with the OpenInferenceTracer as a callback. To do this, you will have to instrument your LangChain application with the tracer:
|
|
203
203
|
|
|
204
|
-
from phoenix.trace.langchain import OpenInferenceTracer
|
|
204
|
+
from phoenix.trace.langchain import OpenInferenceTracer, LangChainInstrumentor
|
|
205
205
|
|
|
206
206
|
# If no exporter is specified, the tracer will export to the locally running Phoenix server
|
|
207
207
|
tracer = OpenInferenceTracer()
|
|
208
|
+
LangChainInstrumentor(tracer).instrument()
|
|
208
209
|
|
|
209
210
|
# Initialize your LangChain application
|
|
210
211
|
from langchain.chains import RetrievalQA
|
|
@@ -367,13 +368,13 @@ Break-apart your data into clusters of high drift or bad performance using HDBSC
|
|
|
367
368
|
|
|
368
369
|
Export your clusters to `parquet` files or dataframes for further analysis and fine-tuning.
|
|
369
370
|
|
|
370
|
-
##
|
|
371
|
+
## Retrieval-Augmented Generation Analysis
|
|
371
372
|
|
|
372
373
|
[](https://colab.research.google.com/github/Arize-ai/phoenix/blob/main/tutorials/llama_index_search_and_retrieval_tutorial.ipynb) [](https://github.com/Arize-ai/phoenix/blob/main/tutorials/llama_index_search_and_retrieval_tutorial.ipynb)
|
|
373
374
|
|
|
374
|
-

|
|
375
376
|
|
|
376
|
-
Search and retrieval is a critical component of many LLM Applications as it allows you to extend the LLM's capabilities to encompass knowledge about private data. This process is known as RAG (retrieval
|
|
377
|
+
Search and retrieval is a critical component of many LLM Applications as it allows you to extend the LLM's capabilities to encompass knowledge about private data. This process is known as RAG (retrieval-augmented generation) and often times a vector store is leveraged to store chunks of documents encoded as embeddings so that they can be retrieved at inference time.
|
|
377
378
|
|
|
378
379
|
To help you better understand your RAG application, Phoenix allows you to upload a corpus of your knowledge base along with your LLM application's inferences to help you troubleshoot hard to find bugs with retrieval.
|
|
379
380
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
phoenix/__init__.py,sha256=
|
|
1
|
+
phoenix/__init__.py,sha256=6VUXCP54MN-nzyGzD4p7uCA3AznwSgDPGmg88D5iqhU,1255
|
|
2
2
|
phoenix/config.py,sha256=TdMKmU7V490I38x_hvB1s14Y8pV3ldLSpJTKq6crzBY,1952
|
|
3
3
|
phoenix/datetime_utils.py,sha256=D955QLrkgrrSdUM6NyqbCeAu2SMsjhR5rHVQEsVUdng,2773
|
|
4
4
|
phoenix/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
@@ -8,7 +8,7 @@ phoenix/core/embedding_dimension.py,sha256=zKGbcvwOXgLf-yrJBpQyKtd-LEOPRKHnUToyA
|
|
|
8
8
|
phoenix/core/model.py,sha256=vQ6RxpUPlncezJvur5u6xBN0Lkrk2gW0cTyb-qqaSqA,4713
|
|
9
9
|
phoenix/core/model_schema.py,sha256=rR9VdhL_oXxbprDTPQJBXs5hw5sMPQmzx__m6Kwsxug,50394
|
|
10
10
|
phoenix/core/model_schema_adapter.py,sha256=3GkyzqUST4fYi-Bgs8qAam5hwMCdQRZTDLjZ9Bnzdm4,8268
|
|
11
|
-
phoenix/core/traces.py,sha256=
|
|
11
|
+
phoenix/core/traces.py,sha256=eMiE3g2W8ghQymHqzqViUB9mmbpmKKJG88CSYVCyMp0,11512
|
|
12
12
|
phoenix/datasets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
13
|
phoenix/datasets/dataset.py,sha256=scKVZ7zc6Dpc_ntt-pWhzY-KWqOJEwKePuyNnKSVTGE,30515
|
|
14
14
|
phoenix/datasets/errors.py,sha256=cGp9vxnw4SewFoWBV3ZGMkhE0Kh73lPIv3Ppz_H_RoA,8261
|
|
@@ -17,10 +17,10 @@ phoenix/datasets/schema.py,sha256=bF1d2Md6NyqQZuC4Ym5A52f2_IcazkyxGFZ11HPqSg0,66
|
|
|
17
17
|
phoenix/datasets/validation.py,sha256=dZ9lCFUV0EY7HCkQkQBrs-GLAEIZdpOqUxwD5l4dp88,8294
|
|
18
18
|
phoenix/experimental/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
19
|
phoenix/experimental/evals/__init__.py,sha256=VddJA_rloCyFn4brDCW2YOhTBjvcoBsXJ0N1SdTKx6U,1124
|
|
20
|
-
phoenix/experimental/evals/retrievals.py,sha256=
|
|
20
|
+
phoenix/experimental/evals/retrievals.py,sha256=Y3YupYrrzt_orTMEFFW3eDBrHcMnBsqTqEQu7BWAUlk,3828
|
|
21
21
|
phoenix/experimental/evals/utils.py,sha256=ivrYuX5Xotjh12BWOpYk9O7TgOt8uGDfdnRpYfrybmQ,1102
|
|
22
22
|
phoenix/experimental/evals/functions/__init__.py,sha256=8P3nB_xln-ofLvQV7enwkjYp-I12Ao09MlK7E8ZITxY,209
|
|
23
|
-
phoenix/experimental/evals/functions/binary.py,sha256=
|
|
23
|
+
phoenix/experimental/evals/functions/binary.py,sha256=wPekcqOxJonkXcSsqwf20aUilSrBKmw3p__nQGVYwYI,8300
|
|
24
24
|
phoenix/experimental/evals/functions/common.py,sha256=u2M2GCSOQWvAnBSdN2qLFrVb4rh2tnVKkp_wgmN-Nm8,1587
|
|
25
25
|
phoenix/experimental/evals/functions/generate.py,sha256=ZnKKfsRW8lSERwh6DWPAl0GCBeFWB6K8vCV_-d8WxXA,1825
|
|
26
26
|
phoenix/experimental/evals/models/__init__.py,sha256=W8ExfTmJ7xWFZ41YYcPmCpBBFZTWqo1VX2KaTr4t09Y,161
|
|
@@ -109,7 +109,7 @@ phoenix/server/static/apple-touch-icon-76x76.png,sha256=CT_xT12I0u2i0WU8JzBZBuOQ
|
|
|
109
109
|
phoenix/server/static/apple-touch-icon.png,sha256=fOfpjqGpWYbJ0eAurKsyoZP1EAs6ZVooBJ_SGk2ZkDs,3801
|
|
110
110
|
phoenix/server/static/favicon.ico,sha256=bY0vvCKRftemZfPShwZtE93DiiQdaYaozkPGwNFr6H8,34494
|
|
111
111
|
phoenix/server/static/index.css,sha256=KKGpx4iwF91VGRm0YN-4cn8oC-oIqC6HecoPf0x3ZM8,1885
|
|
112
|
-
phoenix/server/static/index.js,sha256=
|
|
112
|
+
phoenix/server/static/index.js,sha256=A-pcB3LmArVtXFL4-WwYVrW97TuOk0AjvDckC8IumyQ,3026120
|
|
113
113
|
phoenix/server/static/modernizr.js,sha256=mvK-XtkNqjOral-QvzoqsyOMECXIMu5BQwSVN_wcU9c,2564
|
|
114
114
|
phoenix/server/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
115
115
|
phoenix/server/templates/index.html,sha256=wvVyoBRx4J9IQuR86VamPLpinhCnCEN2V4Kd_npsxU0,1124
|
|
@@ -118,7 +118,7 @@ phoenix/session/session.py,sha256=PRRw4tsbII0d09P-guRKzh9VY3pPoj2m_hAuQWSGR_s,12
|
|
|
118
118
|
phoenix/trace/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
119
119
|
phoenix/trace/exporter.py,sha256=Q1Gxw6vDW1quuv2qeHWvzCsfxoO9s-iFsWlZYXOON8s,2007
|
|
120
120
|
phoenix/trace/filter.py,sha256=-UqIr9DT9IQLNGBWCvNe8nAlK8KGHgoj8wUWEWmOzZA,6313
|
|
121
|
-
phoenix/trace/fixtures.py,sha256=
|
|
121
|
+
phoenix/trace/fixtures.py,sha256=FbUmz3a9MCpAWevdC2kSW53_W0RKchcprSvurlpspvU,3334
|
|
122
122
|
phoenix/trace/schemas.py,sha256=XDtwisCiQvcAZbi81HBaWxaJXXQ97r6b2y7H4nvpktc,5183
|
|
123
123
|
phoenix/trace/semantic_conventions.py,sha256=b-Vgp3By49mgCcq5p6YCOws6K9bEp-uDG5NDvnaxYzI,4691
|
|
124
124
|
phoenix/trace/span_json_decoder.py,sha256=pc6KtjleTf13blMm9dNCm7rXLXjZMY8jCQhqZ_gxwQ8,3089
|
|
@@ -126,15 +126,16 @@ phoenix/trace/span_json_encoder.py,sha256=C5y7rkyOcV08oJC5t8TZqVxsKCZMJKad7bBQzA
|
|
|
126
126
|
phoenix/trace/trace_dataset.py,sha256=-Cr7XeUfncNwn67RqAM2u-JgJiYXyE0gXSkmmKttkao,4684
|
|
127
127
|
phoenix/trace/tracer.py,sha256=R2bY3gAP2VaimCtKSrPLcvgsYZ9p76j1LzKukMTJijk,3524
|
|
128
128
|
phoenix/trace/utils.py,sha256=PZGJV17aHCz6f0Wq0rPBIsJOCisEkCSawX0h23Ok4Pw,466
|
|
129
|
-
phoenix/trace/langchain/__init__.py,sha256=
|
|
129
|
+
phoenix/trace/langchain/__init__.py,sha256=vAjrmrreetV7L5IL8VH_9efG9VJunJTgT0iKyWqjFbc,148
|
|
130
|
+
phoenix/trace/langchain/instrumentor.py,sha256=3dsnDqZ1gelvgYkd-s1rgv0igqt49mCflpqlQD1SENE,1339
|
|
130
131
|
phoenix/trace/langchain/tracer.py,sha256=YGLDDuRv8eWnydGHmXDzhI22zQcoyJVcDqV5XF3BNik,14489
|
|
131
132
|
phoenix/trace/llama_index/__init__.py,sha256=4fpR5702Qh2t5TaXIx584EkA-BveCPftXPOKvI0Oi3I,105
|
|
132
|
-
phoenix/trace/llama_index/callback.py,sha256=
|
|
133
|
+
phoenix/trace/llama_index/callback.py,sha256=tuEJl5VXh2jDyuOq5BUjlGI9-MyVBQfqJtADSklv2Xw,19771
|
|
133
134
|
phoenix/trace/v1/__init__.py,sha256=FYL2u6f5prFtbQohQf_x-yR0hVflm7OAunO1fvo2KXg,17032
|
|
134
135
|
phoenix/trace/v1/trace_pb2.py,sha256=DPDwoF4HOa3T2R-Qi7c2uXkbypOXcrOkCysMB-yrKXw,5580
|
|
135
136
|
phoenix/trace/v1/trace_pb2.pyi,sha256=2JpgiYz3s8HrxnVIi5Brk7c3RJB4LqDGzwRYonhliRA,16258
|
|
136
|
-
arize_phoenix-0.0.
|
|
137
|
-
arize_phoenix-0.0.
|
|
138
|
-
arize_phoenix-0.0.
|
|
139
|
-
arize_phoenix-0.0.
|
|
140
|
-
arize_phoenix-0.0.
|
|
137
|
+
arize_phoenix-0.0.41.dist-info/METADATA,sha256=aHxTG23lJnfr0pL6fj4Fn-rDRHHCTGYebzPfC20-48Y,25524
|
|
138
|
+
arize_phoenix-0.0.41.dist-info/WHEEL,sha256=9QBuHhg6FNW7lppboF2vKVbCGTVzsFykgRQjjlajrhA,87
|
|
139
|
+
arize_phoenix-0.0.41.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
|
|
140
|
+
arize_phoenix-0.0.41.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
|
|
141
|
+
arize_phoenix-0.0.41.dist-info/RECORD,,
|
phoenix/__init__.py
CHANGED
|
@@ -5,7 +5,7 @@ from .session.session import Session, active_session, close_app, launch_app
|
|
|
5
5
|
from .trace.fixtures import load_example_traces
|
|
6
6
|
from .trace.trace_dataset import TraceDataset
|
|
7
7
|
|
|
8
|
-
__version__ = "0.0.
|
|
8
|
+
__version__ = "0.0.41"
|
|
9
9
|
|
|
10
10
|
# module level doc-string
|
|
11
11
|
__doc__ = """
|
phoenix/core/traces.py
CHANGED
|
@@ -183,8 +183,16 @@ def _extract_rail(string: str, positive_rail: str, negative_rail: str) -> Option
|
|
|
183
183
|
|
|
184
184
|
string = "regular..irregular" - contains both rails
|
|
185
185
|
Output: None
|
|
186
|
+
|
|
187
|
+
string = "Irregular"
|
|
188
|
+
Output: "irregular"
|
|
186
189
|
"""
|
|
187
190
|
|
|
191
|
+
# Convert the inputs to lowercase for case-insensitive matching
|
|
192
|
+
string = string.lower()
|
|
193
|
+
positive_rail = positive_rail.lower()
|
|
194
|
+
negative_rail = negative_rail.lower()
|
|
195
|
+
|
|
188
196
|
positive_pos, negative_pos = string.find(positive_rail), string.find(negative_rail)
|
|
189
197
|
|
|
190
198
|
# If both positive and negative rails are in the string
|
|
@@ -4,7 +4,6 @@ Helper functions for evaluating the retrieval step of retrieval-augmented genera
|
|
|
4
4
|
|
|
5
5
|
from typing import List, Optional
|
|
6
6
|
|
|
7
|
-
from openai import ChatCompletion
|
|
8
7
|
from tenacity import (
|
|
9
8
|
retry,
|
|
10
9
|
stop_after_attempt,
|
|
@@ -75,6 +74,9 @@ def classify_relevance(query: str, document: str, model_name: str) -> Optional[b
|
|
|
75
74
|
(True meaning relevant, False meaning irrelevant), or None if the LLM produces an
|
|
76
75
|
unparseable output.
|
|
77
76
|
"""
|
|
77
|
+
|
|
78
|
+
from openai import ChatCompletion
|
|
79
|
+
|
|
78
80
|
prompt = _QUERY_CONTEXT_PROMPT_TEMPLATE.format(
|
|
79
81
|
query=query,
|
|
80
82
|
reference=document,
|