vectoryai 1.0.0__tar.gz
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.
- vectoryai-1.0.0/.streamlit/config.toml +22 -0
- vectoryai-1.0.0/LICENSE +21 -0
- vectoryai-1.0.0/MANIFEST.in +9 -0
- vectoryai-1.0.0/PKG-INFO +409 -0
- vectoryai-1.0.0/README.md +356 -0
- vectoryai-1.0.0/app.py +225 -0
- vectoryai-1.0.0/components/__init__.py +11 -0
- vectoryai-1.0.0/components/document_loader.py +350 -0
- vectoryai-1.0.0/components/error_discovery.py +171 -0
- vectoryai-1.0.0/components/evaluators/__init__.py +0 -0
- vectoryai-1.0.0/components/evaluators/base.py +67 -0
- vectoryai-1.0.0/components/evaluators/llm_judge.py +237 -0
- vectoryai-1.0.0/components/evaluators/metrics.py +260 -0
- vectoryai-1.0.0/components/evaluators/rag_metrics.py +418 -0
- vectoryai-1.0.0/components/model_catalog.py +124 -0
- vectoryai-1.0.0/components/models.py +214 -0
- vectoryai-1.0.0/components/mteb_evaluator.py +296 -0
- vectoryai-1.0.0/components/mteb_leaderboard.py +461 -0
- vectoryai-1.0.0/components/themes.py +1305 -0
- vectoryai-1.0.0/components/ui.py +506 -0
- vectoryai-1.0.0/components/vectory_benchmark/__init__.py +14 -0
- vectoryai-1.0.0/components/vectory_benchmark/leaderboard.py +78 -0
- vectoryai-1.0.0/components/vectory_benchmark/pathology.py +465 -0
- vectoryai-1.0.0/components/vectory_benchmark/schemas.py +268 -0
- vectoryai-1.0.0/components/vectory_benchmark/scoring.py +345 -0
- vectoryai-1.0.0/components/vectory_benchmark/suite.py +27 -0
- vectoryai-1.0.0/components/vectory_benchmark/trace_parser.py +128 -0
- vectoryai-1.0.0/components/visualization.py +170 -0
- vectoryai-1.0.0/data/sample_dataset.json +52 -0
- vectoryai-1.0.0/data/vectory_benchmark/example_submission.json +140 -0
- vectoryai-1.0.0/data/vectory_benchmark/manifest.json +283 -0
- vectoryai-1.0.0/docs/vectory_benchmark.md +250 -0
- vectoryai-1.0.0/pages/1_/360/237/223/212_Dataset.py +262 -0
- vectoryai-1.0.0/pages/2_/360/237/244/226_LLM_Judge.py +487 -0
- vectoryai-1.0.0/pages/3_/360/237/223/217_Metrics.py +366 -0
- vectoryai-1.0.0/pages/4_/360/237/221/244_Human_Eval.py +377 -0
- vectoryai-1.0.0/pages/5_/360/237/217/206_Leaderboard.py +329 -0
- vectoryai-1.0.0/pages/6_/360/237/247/252_Custom_Benchmark.py +764 -0
- vectoryai-1.0.0/pages/7_/342/232/231/357/270/217_Settings.py +352 -0
- vectoryai-1.0.0/pages/8_/360/237/224/215_Error_Analysis.py +705 -0
- vectoryai-1.0.0/pages/9_/360/237/247/255_VectoryBenchmark.py +602 -0
- vectoryai-1.0.0/pyproject.toml +79 -0
- vectoryai-1.0.0/requirements.txt +64 -0
- vectoryai-1.0.0/scripts/run_vectory_benchmark.py +144 -0
- vectoryai-1.0.0/setup.cfg +4 -0
- vectoryai-1.0.0/setup.py +42 -0
- vectoryai-1.0.0/tests/__init__.py +1 -0
- vectoryai-1.0.0/tests/conftest.py +105 -0
- vectoryai-1.0.0/tests/data/sample.csv +4 -0
- vectoryai-1.0.0/tests/data/sample.json +17 -0
- vectoryai-1.0.0/tests/test_document_loader.py +112 -0
- vectoryai-1.0.0/tests/test_error_discovery.py +86 -0
- vectoryai-1.0.0/tests/test_metrics.py +180 -0
- vectoryai-1.0.0/tests/test_models.py +210 -0
- vectoryai-1.0.0/tests/test_vectory_benchmark.py +185 -0
- vectoryai-1.0.0/vectory_cli/__init__.py +5 -0
- vectoryai-1.0.0/vectory_cli/cli.py +151 -0
- vectoryai-1.0.0/vectoryai.egg-info/PKG-INFO +409 -0
- vectoryai-1.0.0/vectoryai.egg-info/SOURCES.txt +61 -0
- vectoryai-1.0.0/vectoryai.egg-info/dependency_links.txt +1 -0
- vectoryai-1.0.0/vectoryai.egg-info/entry_points.txt +2 -0
- vectoryai-1.0.0/vectoryai.egg-info/requires.txt +29 -0
- vectoryai-1.0.0/vectoryai.egg-info/top_level.txt +2 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[theme]
|
|
2
|
+
# Vectory - Precision LLM Evaluation
|
|
3
|
+
# Developer-centric dark theme
|
|
4
|
+
primaryColor = "#6366f1"
|
|
5
|
+
backgroundColor = "#0f172a"
|
|
6
|
+
secondaryBackgroundColor = "#1e293b"
|
|
7
|
+
textColor = "#f1f5f9"
|
|
8
|
+
font = "sans serif"
|
|
9
|
+
|
|
10
|
+
[server]
|
|
11
|
+
# Server configuration
|
|
12
|
+
headless = true
|
|
13
|
+
enableCORS = false
|
|
14
|
+
enableXsrfProtection = true
|
|
15
|
+
|
|
16
|
+
[browser]
|
|
17
|
+
# Browser settings
|
|
18
|
+
gatherUsageStats = false
|
|
19
|
+
|
|
20
|
+
[runner]
|
|
21
|
+
# Runner settings
|
|
22
|
+
fastReruns = true
|
vectoryai-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Balaji Iyer
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
include app.py
|
|
2
|
+
include requirements.txt
|
|
3
|
+
recursive-include .streamlit *.toml
|
|
4
|
+
recursive-include pages *.py
|
|
5
|
+
recursive-include components *.py
|
|
6
|
+
recursive-include data *.json *.jsonl *.csv
|
|
7
|
+
recursive-include docs *.md
|
|
8
|
+
recursive-include scripts *.py
|
|
9
|
+
recursive-include tests *.py *.json *.csv
|
vectoryai-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: vectoryai
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Trace-aware AI evaluation toolkit and local Vectory Benchmark runner.
|
|
5
|
+
Author: Tactical Edge
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://vectoryai.com
|
|
8
|
+
Project-URL: Application, https://app.vectoryai.com
|
|
9
|
+
Project-URL: Repository, https://github.com/tacticaledge/vectory
|
|
10
|
+
Keywords: llm,agents,evaluation,benchmark,rag,streamlit
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Environment :: Web Environment
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
21
|
+
Classifier: Topic :: Software Development :: Testing
|
|
22
|
+
Requires-Python: >=3.10
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Requires-Dist: streamlit>=1.28.0
|
|
26
|
+
Requires-Dist: pandas>=2.0.0
|
|
27
|
+
Requires-Dist: pydantic>=2.0.0
|
|
28
|
+
Requires-Dist: requests>=2.32.4
|
|
29
|
+
Requires-Dist: plotly>=5.18.0
|
|
30
|
+
Requires-Dist: streamlit-lottie>=0.0.5
|
|
31
|
+
Requires-Dist: matplotlib>=3.7.0
|
|
32
|
+
Requires-Dist: pymupdf4llm>=0.0.17
|
|
33
|
+
Requires-Dist: pymupdf>=1.24.0
|
|
34
|
+
Requires-Dist: Pillow>=10.4.0
|
|
35
|
+
Requires-Dist: evaluate>=0.4.1
|
|
36
|
+
Requires-Dist: rouge-score>=0.1.2
|
|
37
|
+
Requires-Dist: nltk>=3.9.0
|
|
38
|
+
Requires-Dist: python-Levenshtein>=0.25.0
|
|
39
|
+
Requires-Dist: openai>=1.40.0
|
|
40
|
+
Requires-Dist: anthropic>=0.34.0
|
|
41
|
+
Requires-Dist: scipy>=1.13.0
|
|
42
|
+
Requires-Dist: numpy>=1.26.0
|
|
43
|
+
Provides-Extra: embedding
|
|
44
|
+
Requires-Dist: torch>=2.1.0; extra == "embedding"
|
|
45
|
+
Requires-Dist: mteb>=1.0.0; extra == "embedding"
|
|
46
|
+
Requires-Dist: sentence-transformers>=2.2.0; extra == "embedding"
|
|
47
|
+
Provides-Extra: dev
|
|
48
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
49
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
|
50
|
+
Requires-Dist: build>=1.0.0; extra == "dev"
|
|
51
|
+
Requires-Dist: twine>=5.0.0; extra == "dev"
|
|
52
|
+
Dynamic: license-file
|
|
53
|
+
|
|
54
|
+
# Vectory
|
|
55
|
+
|
|
56
|
+
[](https://www.python.org/downloads/)
|
|
57
|
+
[](https://streamlit.io/)
|
|
58
|
+
[](https://opensource.org/licenses/MIT)
|
|
59
|
+
|
|
60
|
+
**Precision LLM Evaluation** - A powerful, professional-grade toolkit for evaluating Large Language Model outputs.
|
|
61
|
+
|
|
62
|
+
## Features
|
|
63
|
+
|
|
64
|
+
- **📊 Dataset Management** - Upload JSON, CSV, or PDF files. Automatic column detection and mapping.
|
|
65
|
+
- **🤖 LLM-as-Judge** - Use current OpenAI or Anthropic models to automatically evaluate output quality with customizable criteria.
|
|
66
|
+
- **📏 Rule-Based Metrics** - Calculate BLEU, ROUGE, exact match, Levenshtein similarity, and regex patterns.
|
|
67
|
+
- **🔍 Error Analysis** - Discover failure modes with open coding, axial coding, taxonomy dashboards, and AI-assisted taxonomy suggestions.
|
|
68
|
+
- **🔎 RAG Metrics** - Evaluate retrieval precision, recall, MRR, NDCG, context relevance, faithfulness, and answer completeness.
|
|
69
|
+
- **👤 Human Evaluation** - Rate outputs manually with customizable scales and criteria.
|
|
70
|
+
- **🏆 MTEB Leaderboard** - View embedding model benchmarks from the Massive Text Embedding Benchmark.
|
|
71
|
+
- **🧪 Custom Benchmarks** - Prepare organization datasets and run optional local embedding model comparisons.
|
|
72
|
+
- **🧭 Vectory Benchmark** - Score submitted agent traces for task success, reality sampling, tool discipline, recovery, control, and turn efficiency.
|
|
73
|
+
- **⚙️ Configurable Themes** - Switch between Dark, Light, and Colorblind-safe themes for accessibility.
|
|
74
|
+
|
|
75
|
+
## Quick Start
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
pip install vectoryai
|
|
79
|
+
vectory app
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Use `pipx` when you want an isolated CLI install:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
pipx install vectoryai
|
|
86
|
+
vectory app
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
The app opens in your browser at `http://localhost:8501`.
|
|
90
|
+
|
|
91
|
+
Run the included agent benchmark example from the CLI:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
vectory benchmark data/vectory_benchmark/example_submission.json
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Installation
|
|
98
|
+
|
|
99
|
+
### Local CLI
|
|
100
|
+
|
|
101
|
+
Use `pip` inside an activated virtual environment or project environment:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
pip install vectoryai
|
|
105
|
+
vectory app
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Use `pipx` when you want Vectory as a standalone local command without mixing its dependencies into another Python project:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
pipx install vectoryai
|
|
112
|
+
vectory app --port 8501
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Source Checkout
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
git clone https://github.com/tacticaledge/vectory.git
|
|
119
|
+
cd vectory
|
|
120
|
+
pip install -e ".[dev]"
|
|
121
|
+
vectory app
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Prerequisites
|
|
125
|
+
|
|
126
|
+
- Python 3.10 or higher
|
|
127
|
+
- pip, pipx, or uv
|
|
128
|
+
|
|
129
|
+
### Contributor Installation
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
# Create a virtual environment (recommended)
|
|
133
|
+
python -m venv venv
|
|
134
|
+
source venv/bin/activate # On Windows: venv\Scripts\activate
|
|
135
|
+
|
|
136
|
+
# Install the project in editable mode
|
|
137
|
+
pip install -e ".[dev]"
|
|
138
|
+
|
|
139
|
+
# Launch the app
|
|
140
|
+
vectory app
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Optional: Embedding Benchmark Support
|
|
144
|
+
|
|
145
|
+
The default install does not include PyTorch. Embedding comparison features are optional because they add large model dependencies. Install them only when you need local embedding benchmark runs:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
pip install "vectoryai[embedding]"
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
For a source checkout, install the optional extra from the checkout:
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
pip install -e ".[embedding]"
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
For an existing `pipx` install, add the optional runtime to the isolated Vectory environment:
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
pipx inject vectoryai "torch>=2.1.0" mteb sentence-transformers
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## Usage
|
|
164
|
+
|
|
165
|
+
### 1. Upload Your Data
|
|
166
|
+
|
|
167
|
+
Navigate to the **📊 Dataset** page and upload your evaluation data:
|
|
168
|
+
|
|
169
|
+
- **JSON/JSONL**: Arrays of objects with input/output/expected fields
|
|
170
|
+
- **CSV**: Tabular data with headers
|
|
171
|
+
- **PDF**: Extracted to markdown (optimized for LLM consumption)
|
|
172
|
+
|
|
173
|
+
The app will automatically detect column roles, or you can map them manually.
|
|
174
|
+
|
|
175
|
+
### 2. Run Evaluations
|
|
176
|
+
|
|
177
|
+
Choose your evaluation method:
|
|
178
|
+
|
|
179
|
+
#### LLM-as-Judge (🤖)
|
|
180
|
+
- Select provider (OpenAI or Anthropic)
|
|
181
|
+
- Enter your API key
|
|
182
|
+
- Choose evaluation criteria
|
|
183
|
+
- Run batch evaluation
|
|
184
|
+
|
|
185
|
+
#### Rule-Based Metrics (📏)
|
|
186
|
+
- Select metrics (BLEU, ROUGE, exact match, etc.)
|
|
187
|
+
- Run evaluation
|
|
188
|
+
- View per-sample and aggregate results
|
|
189
|
+
|
|
190
|
+
#### Error Analysis (🔍)
|
|
191
|
+
- Review traces using open coding and pass/fail decisions
|
|
192
|
+
- Group notes into a structured failure-mode taxonomy
|
|
193
|
+
- Generate AI-assisted taxonomy suggestions from reviewer notes
|
|
194
|
+
- Export annotations, taxonomies, and summary reports
|
|
195
|
+
|
|
196
|
+
#### Human Evaluation (👤)
|
|
197
|
+
- Navigate through samples
|
|
198
|
+
- Rate on customizable scales
|
|
199
|
+
- Add feedback and criteria tags
|
|
200
|
+
- Export annotations
|
|
201
|
+
|
|
202
|
+
#### Vectory Benchmark (🧭)
|
|
203
|
+
- Upload agent run traces as JSON or JSONL
|
|
204
|
+
- Score submitted runs against a built-in agent reliability manifest
|
|
205
|
+
- Review pathologies such as premature planning, retrieval thrashing, ignored evidence, and approval bypass
|
|
206
|
+
- Export run scores and leaderboard summaries
|
|
207
|
+
|
|
208
|
+
Vectory Benchmark is designed for teams that need to understand agent behavior from real traces: whether the agent observed before acting, used tools productively, recovered from failure, respected scope, and stopped before extra turns became low-value work. For private evaluations of internal agents and workflows, use the Vectory contact form: https://vectoryai.com/#contact
|
|
209
|
+
|
|
210
|
+
Run the included example from the command line:
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
vectory benchmark data/vectory_benchmark/example_submission.json
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Export scores and leaderboard summaries:
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
vectory benchmark data/vectory_benchmark/example_submission.json \
|
|
220
|
+
--scores-out vectory-scores.json \
|
|
221
|
+
--leaderboard-out vectory-leaderboard.csv
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### 3. Export Results
|
|
225
|
+
|
|
226
|
+
Download your evaluation results as CSV or JSON from any results page.
|
|
227
|
+
|
|
228
|
+
## Configuration
|
|
229
|
+
|
|
230
|
+
### API Keys
|
|
231
|
+
|
|
232
|
+
Configure API keys in one of three ways:
|
|
233
|
+
|
|
234
|
+
#### Option 1: Streamlit Secrets (Recommended for deployment)
|
|
235
|
+
|
|
236
|
+
Create `.streamlit/secrets.toml`:
|
|
237
|
+
|
|
238
|
+
```toml
|
|
239
|
+
[api_keys]
|
|
240
|
+
openai = "<openai-api-key>"
|
|
241
|
+
anthropic = "<anthropic-api-key>"
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
#### Option 2: Environment Variables
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
export OPENAI_API_KEY="<openai-api-key>"
|
|
248
|
+
export ANTHROPIC_API_KEY="<anthropic-api-key>"
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
#### Option 3: Manual Input
|
|
252
|
+
|
|
253
|
+
Enter your API key directly in the UI (stored only in session).
|
|
254
|
+
|
|
255
|
+
### Themes & Accessibility
|
|
256
|
+
|
|
257
|
+
Vectory includes multiple themes to suit different preferences and accessibility needs. Change your theme in the **⚙️ Settings** page.
|
|
258
|
+
|
|
259
|
+
#### Available Themes:
|
|
260
|
+
|
|
261
|
+
| Theme | Description |
|
|
262
|
+
|-------|-------------|
|
|
263
|
+
| **Dark Developer** | Modern dark theme optimized for developers (default) |
|
|
264
|
+
| **Light** | Clean light theme for bright environments |
|
|
265
|
+
| **High Contrast (Colorblind Safe)** | Blue-orange palette distinguishable by most forms of color blindness |
|
|
266
|
+
| **High Contrast Dark** | Maximum contrast for users with low vision |
|
|
267
|
+
|
|
268
|
+
The colorblind-safe theme uses a carefully selected palette that works for:
|
|
269
|
+
- Deuteranopia (red-green color blindness)
|
|
270
|
+
- Protanopia (red color blindness)
|
|
271
|
+
- Tritanopia (blue-yellow color blindness)
|
|
272
|
+
|
|
273
|
+
### Streamlit Configuration
|
|
274
|
+
|
|
275
|
+
The default theme is configured in `.streamlit/config.toml`:
|
|
276
|
+
|
|
277
|
+
```toml
|
|
278
|
+
[theme]
|
|
279
|
+
primaryColor = "#6366f1"
|
|
280
|
+
backgroundColor = "#0f172a"
|
|
281
|
+
secondaryBackgroundColor = "#1e293b"
|
|
282
|
+
textColor = "#f1f5f9"
|
|
283
|
+
font = "monospace"
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
## Deployment
|
|
287
|
+
|
|
288
|
+
### Python Package Release
|
|
289
|
+
|
|
290
|
+
Vectory is packaged for Python distribution as `vectoryai` and exposes the `vectory` command. Release publishing to PyPI is handled by the `Publish Python Package` GitHub Actions workflow when a version tag such as `v1.0.0` is pushed, or when the workflow is run manually.
|
|
291
|
+
|
|
292
|
+
Publishing uses PyPI Trusted Publishing. Internal package mirrors, when enabled, use GitHub Actions secrets and variables that are not committed to the public repository.
|
|
293
|
+
|
|
294
|
+
### Docker
|
|
295
|
+
|
|
296
|
+
```dockerfile
|
|
297
|
+
FROM python:3.10-slim
|
|
298
|
+
|
|
299
|
+
WORKDIR /app
|
|
300
|
+
COPY . .
|
|
301
|
+
|
|
302
|
+
RUN pip install .
|
|
303
|
+
|
|
304
|
+
EXPOSE 8501
|
|
305
|
+
|
|
306
|
+
CMD ["vectory", "app", "--address", "0.0.0.0"]
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
### Manual Deployment
|
|
310
|
+
|
|
311
|
+
```bash
|
|
312
|
+
vectory app --port 8501 --address 0.0.0.0
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
## Project Structure
|
|
316
|
+
|
|
317
|
+
```
|
|
318
|
+
vectory/
|
|
319
|
+
├── app.py # Main entry point
|
|
320
|
+
├── requirements.txt # Python dependencies
|
|
321
|
+
├── pages/ # Streamlit pages
|
|
322
|
+
│ ├── 1_📊_Dataset.py # Dataset upload & config
|
|
323
|
+
│ ├── 2_🤖_LLM_Judge.py # LLM-as-Judge evaluation
|
|
324
|
+
│ ├── 3_📏_Metrics.py # Rule-based metrics
|
|
325
|
+
│ ├── 4_👤_Human_Eval.py # Human evaluation
|
|
326
|
+
│ ├── 5_🏆_Leaderboard.py # MTEB leaderboard
|
|
327
|
+
│ ├── 6_🧪_Custom_Benchmark.py
|
|
328
|
+
│ ├── 7_⚙️_Settings.py # Theme & API key settings
|
|
329
|
+
│ ├── 8_🔍_Error_Analysis.py
|
|
330
|
+
│ └── 9_🧭_VectoryBenchmark.py
|
|
331
|
+
├── components/ # Core modules
|
|
332
|
+
│ ├── __init__.py # Version and branding
|
|
333
|
+
│ ├── models.py # Pydantic data models
|
|
334
|
+
│ ├── themes.py # Configurable theme system
|
|
335
|
+
│ ├── document_loader.py # File loading utilities
|
|
336
|
+
│ ├── error_discovery.py # AI-assisted taxonomy helpers
|
|
337
|
+
│ ├── ui.py # Animated UI components
|
|
338
|
+
│ ├── mteb_evaluator.py # Embedding evaluation
|
|
339
|
+
│ └── evaluators/ # Evaluation implementations
|
|
340
|
+
│ ├── llm_judge.py
|
|
341
|
+
│ ├── rag_metrics.py
|
|
342
|
+
│ └── metrics.py
|
|
343
|
+
├── tests/ # Test suite
|
|
344
|
+
└── data/ # Sample datasets
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
## Testing
|
|
348
|
+
|
|
349
|
+
```bash
|
|
350
|
+
# Install test dependencies
|
|
351
|
+
pip install -e ".[dev]"
|
|
352
|
+
|
|
353
|
+
# Run tests
|
|
354
|
+
pytest tests/ -v
|
|
355
|
+
|
|
356
|
+
# Run with coverage
|
|
357
|
+
pytest tests/ -v --cov=components --cov-report=html
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
## Troubleshooting
|
|
361
|
+
|
|
362
|
+
### PyTorch Version Error
|
|
363
|
+
|
|
364
|
+
If you see `module 'torch' has no attribute 'compiler'`:
|
|
365
|
+
|
|
366
|
+
```bash
|
|
367
|
+
pip install -e ".[embedding]"
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
The app works without PyTorch. Local embedding model execution stays disabled until the optional embedding extra is installed.
|
|
371
|
+
|
|
372
|
+
### NLTK Data Missing
|
|
373
|
+
|
|
374
|
+
If you see NLTK-related errors:
|
|
375
|
+
|
|
376
|
+
```bash
|
|
377
|
+
python -c "import nltk; nltk.download('punkt'); nltk.download('punkt_tab')"
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
### API Key Issues
|
|
381
|
+
|
|
382
|
+
- Ensure your API key is valid and has sufficient credits
|
|
383
|
+
- Check that the key is correctly formatted (no extra spaces)
|
|
384
|
+
- For Anthropic, ensure you're using the correct model names
|
|
385
|
+
|
|
386
|
+
## Contributing
|
|
387
|
+
|
|
388
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
389
|
+
|
|
390
|
+
1. Fork the repository
|
|
391
|
+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
392
|
+
3. Commit your changes (`git commit -m 'Add amazing feature'`)
|
|
393
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
394
|
+
5. Open a Pull Request
|
|
395
|
+
|
|
396
|
+
## License
|
|
397
|
+
|
|
398
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
399
|
+
|
|
400
|
+
## Acknowledgments
|
|
401
|
+
|
|
402
|
+
- [Streamlit](https://streamlit.io/) - The amazing framework powering this app
|
|
403
|
+
- [MTEB](https://github.com/embeddings-benchmark/mteb) - Massive Text Embedding Benchmark
|
|
404
|
+
- [PyMuPDF4LLM](https://pymupdf.readthedocs.io/) - PDF to Markdown conversion
|
|
405
|
+
- [HuggingFace Evaluate](https://huggingface.co/docs/evaluate/) - Evaluation metrics
|
|
406
|
+
|
|
407
|
+
---
|
|
408
|
+
|
|
409
|
+
**Vectory** - Precision LLM Evaluation | [Tactical Edge](https://tacticaledgeai.com)
|