Skip to content

Commit 292f95a

Browse files
authored
Merge pull request #8 from guardrails-ai/main
v0.0.3 Release
2 parents 58254bf + 0a2e628 commit 292f95a

File tree

9 files changed

+16
-16
lines changed

9 files changed

+16
-16
lines changed

README.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ It can be used in a RAG system to prevent the model from hallucinating or genera
3232
In this example we apply the RagContextValidator to validate the relevance of the retrieved context to the user's query.
3333

3434
```python
35-
from validator.prompts.prompts import RagContextRelevancePrompt
36-
from validator.main import MLcubeRagContextValidator
37-
from guardrails import Guard
3835

3936
# Define the guard with the MLcubeRagContextValidator,
4037
# specifying the relevance prompt generator to enable
@@ -88,11 +85,6 @@ In this example we evaluate the usefulness of the retrieved context to the user'
8885

8986
```python
9087

91-
from validator.prompts.prompts import (
92-
RagContextRelevancePrompt,
93-
RagContextUsefulnessPrompt,
94-
)
95-
9688
guard = Guard().use(
9789
MLcubeRagContextValidator(
9890
rag_context_eval_prompt=RagContextUsefulnessPrompt(),

benchmark/benchmark_llm_rag_context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646
sys.path.append(".")
4747
from guardrails import Guard
48-
from validator.prompts.prompts import (
48+
from validator.prompts import (
4949
Ml3RagContextEvalBasePrompt,
5050
RagContextUsefulnessPrompt,
5151
)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "rag-context-evaluator"
3-
version = "0.0.2"
3+
version = "0.0.3"
44
description = "ML3 RAG Context Evaluator"
55
authors = [
66
{name = "MLcube", email = "info@mlcube.com"}

tests/test_validator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import sys
44

55
sys.path.append(".")
6-
from validator.prompts.prompts import RagContextUsefulnessPrompt
6+
from validator.prompts import RagContextUsefulnessPrompt
77

88
from validator.main import MLcubeRagContextValidator
99

uv.lock

Lines changed: 9 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

validator/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
register_validator,
99
)
1010
import litellm
11-
from validator.prompts.prompts import (
11+
from .prompts import (
1212
Ml3RagContextEvalBasePrompt,
1313
)
14-
from validator.models import RagRatingResponse
14+
from .models import RagRatingResponse
1515
from langchain import chat_models
1616

1717
logger = logging.getLogger(__name__)
File renamed without changes.

validator/prompts/prompts.py renamed to validator/prompts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from abc import ABC, abstractmethod
2-
from validator.enums import TextLanguage
3-
from validator.prompts.prompt_hub import (
2+
from .enums import TextLanguage
3+
from .prompt_hub import (
44
RAG_CONTEXT_RELEVANCE_PROMPT,
55
RAG_CONTEXT_USEFULNESS_PROMPT,
66
)

validator/prompts/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)