arize-phoenix 0.0.40__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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: arize-phoenix
3
- Version: 0.0.40
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,28 +82,28 @@ 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 App Tracing** - 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.
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 Introspection** - Visualize your generative application's search and retrieval process to solve improve your retrieval augmented generation.
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
- - [Installation](#installation)
94
- - [LLM App Tracing](#llm-app-tracing)
95
- - [Tracing with LlamaIndex](#tracing-with-llamaindex)
96
- - [Tracing with LangChain](#tracing-with-langchain)
97
- - [LLM Evals](#llm-evals)
98
- - [Embedding Analysis](#embedding-analysis)
99
- - [UMAP-based Exploratory Data Analysis](#umap-based-exploratory-data-analysis)
100
- - [Cluster-driven Drift and Performance Analysis](#cluster-driven-drift-and-performance-analysis)
101
- - [Exportable Clusters](#exportable-clusters)
102
- - [Retrieval-Augmented Generation Analysis](#retrieval-augmented-generation-analysis)
103
- - [Structured Data Analysis](#structured-data-analysis)
104
- - [Community](#community)
105
- - [Thanks](#thanks)
106
- - [Copyright, Patent, and License](#copyright-patent-and-license)
93
+ - [Installation](#installation)
94
+ - [LLM Traces](#llm-traces)
95
+ - [Tracing with LlamaIndex](#tracing-with-llamaindex)
96
+ - [Tracing with LangChain](#tracing-with-langchain)
97
+ - [LLM Evals](#llm-evals)
98
+ - [Embedding Analysis](#embedding-analysis)
99
+ - [UMAP-based Exploratory Data Analysis](#umap-based-exploratory-data-analysis)
100
+ - [Cluster-driven Drift and Performance Analysis](#cluster-driven-drift-and-performance-analysis)
101
+ - [Exportable Clusters](#exportable-clusters)
102
+ - [Retrieval-Augmented Generation Analysis](#retrieval-augmented-generation-analysis)
103
+ - [Structured Data Analysis](#structured-data-analysis)
104
+ - [Community](#community)
105
+ - [Thanks](#thanks)
106
+ - [Copyright, Patent, and License](#copyright-patent-and-license)
107
107
 
108
108
  ## Installation
109
109
 
@@ -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 App Tracing
122
+ ## LLM Traces
123
123
 
124
124
  ![LLM Application Tracing](https://github.com/Arize-ai/phoenix-assets/blob/main/gifs/langchain_rag_stuff_documents_chain_10mb.gif?raw=true)
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
  [![Open in Colab](https://img.shields.io/static/v1?message=Open%20in%20Colab&logo=googlecolab&labelColor=grey&color=blue&logoColor=orange&label=%20)](https://colab.research.google.com/github/Arize-ai/phoenix/blob/main/tutorials/tracing/llama_index_tracing_tutorial.ipynb) [![Open in GitHub](https://img.shields.io/static/v1?message=Open%20in%20GitHub&logo=github&labelColor=grey&color=blue&logoColor=white&label=%20)](https://github.com/Arize-ai/phoenix/blob/main/tutorials/tracing/llama_index_tracing_tutorial.ipynb)
131
131
 
132
- ![LLM App Tracing UI](https://storage.googleapis.com/arize-assets/phoenix/assets/images/trace_details_view.png)
132
+ ![LLM Traces UI](https://storage.googleapis.com/arize-assets/phoenix/assets/images/trace_details_view.png)
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 OpenInference Tracer as a callback. To do this, you will have to add the tracer to the initialization of your LangChain application:
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
@@ -1,4 +1,4 @@
1
- phoenix/__init__.py,sha256=N3O4mCm6Yw1lDqMoaH_HB4040C-hatB58wqjEv3PSTM,1255
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
@@ -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=B5M2OUXDNpRa6n-QSVXDiRmmJp8YODTff1XPMBTprp4,3822
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=ubX5_vbHSVR5ozRnl_I7Uo2-34DAbXiGmfQcCqCKnUo,8061
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=u3r2txf2qVBThPYGyNwff8MphCr-RHuZrzvyBfBgfVg,3025945
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=Fmv2ASYZ3-FjlBpsu0S6_G2raLj_d3tazegsiEKw5QM,3069
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
@@ -134,8 +134,8 @@ phoenix/trace/llama_index/callback.py,sha256=tuEJl5VXh2jDyuOq5BUjlGI9-MyVBQfqJtA
134
134
  phoenix/trace/v1/__init__.py,sha256=FYL2u6f5prFtbQohQf_x-yR0hVflm7OAunO1fvo2KXg,17032
135
135
  phoenix/trace/v1/trace_pb2.py,sha256=DPDwoF4HOa3T2R-Qi7c2uXkbypOXcrOkCysMB-yrKXw,5580
136
136
  phoenix/trace/v1/trace_pb2.pyi,sha256=2JpgiYz3s8HrxnVIi5Brk7c3RJB4LqDGzwRYonhliRA,16258
137
- arize_phoenix-0.0.40.dist-info/METADATA,sha256=wdRVwxFrfpz4Kc9OOoi-D73mOEuGb8qMB5ne_E05Inc,25464
138
- arize_phoenix-0.0.40.dist-info/WHEEL,sha256=9QBuHhg6FNW7lppboF2vKVbCGTVzsFykgRQjjlajrhA,87
139
- arize_phoenix-0.0.40.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
140
- arize_phoenix-0.0.40.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
141
- arize_phoenix-0.0.40.dist-info/RECORD,,
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.40"
8
+ __version__ = "0.0.41"
9
9
 
10
10
  # module level doc-string
11
11
  __doc__ = """
@@ -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,