Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 21 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,16 @@ Use `Options` to select specific implementations and tune parameters:
```python
feature = Feature(
"docs__pii_redacted__chunked__deduped__embedded",
options=Options(context={
"redaction_method": "regex", # or "simple", "pattern", "presidio"
"chunking_method": "sentence", # or "fixed_size", "paragraph", "semantic"
"deduplication_method": "exact_hash", # or "normalized", "ngram"
"embedding_method": "sentence_transformer", # or "hash", "tfidf", "mock"
"chunk_size": 512,
"chunk_overlap": 128,
}),
options=Options(
context={
"redaction_method": "regex", # or "simple", "pattern", "presidio"
"chunking_method": "sentence", # or "fixed_size", "paragraph", "semantic"
"deduplication_method": "exact_hash", # or "normalized", "ngram"
"embedding_method": "sentence_transformer", # or "hash", "tfidf", "mock"
"chunk_size": 512,
"chunk_overlap": 128,
}
),
)
```

Expand Down Expand Up @@ -150,15 +152,17 @@ from rag_integration.feature_groups.connectors.retrieve import Bm25sRetriever

feature = Feature(
"retrieved_passages",
options=Options(context={
"retrieve_backend": "bm25s",
"query_text": "cat pet",
"corpus": [
{"doc_id": "d1", "text": "A cat is an independent and curious pet."},
{"doc_id": "d2", "text": "Cars need regular engine oil and maintenance."},
],
"top_k": 3,
}),
options=Options(
context={
"retrieve_backend": "bm25s",
"query_text": "cat pet",
"corpus": [
{"doc_id": "d1", "text": "A cat is an independent and curious pet."},
{"doc_id": "d2", "text": "Cars need regular engine oil and maintenance."},
],
"top_k": 3,
}
),
)
results = mlodaAPI.run_all(
[feature],
Expand Down
18 changes: 10 additions & 8 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,16 @@ Use `Options` to select specific implementations and tune parameters:
```python
feature = Feature(
"docs__pii_redacted__chunked__deduped__embedded",
options=Options(context={
"redaction_method": "regex", # or "simple", "pattern", "presidio"
"chunking_method": "sentence", # or "fixed_size", "paragraph", "semantic"
"deduplication_method": "exact_hash", # or "normalized", "ngram"
"embedding_method": "sentence_transformer", # or "hash", "tfidf", "mock"
"chunk_size": 512,
"chunk_overlap": 128,
}),
options=Options(
context={
"redaction_method": "regex", # or "simple", "pattern", "presidio"
"chunking_method": "sentence", # or "fixed_size", "paragraph", "semantic"
"deduplication_method": "exact_hash", # or "normalized", "ngram"
"embedding_method": "sentence_transformer", # or "hash", "tfidf", "mock"
"chunk_size": 512,
"chunk_overlap": 128,
}
),
)
```

Expand Down
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ dev = [
"tox",
"tox-uv",
"pytest",
"ruff",
# tox resolves this extra fresh rather than from uv.lock, so an upstream ruff
# release changes the gate with no code change here. 0.16.0 widened the default
# rule set (1772 new errors) and started formatting python blocks in markdown.
# Pinned to the 0.15 line the lock already resolves; lift it with the cleanup.
"ruff<0.16",
"mypy",
"bandit",
]
Expand Down
20 changes: 11 additions & 9 deletions rag_integration/feature_groups/connectors/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,17 @@ from rag_integration.feature_groups.connectors.retrieve import Bm25sRetriever

feature = Feature(
"retrieved_passages",
options=Options(context={
"retrieve_backend": "bm25s",
"query_text": "cat pet",
"corpus": [
{"doc_id": "d1", "text": "A cat is an independent and curious pet."},
{"doc_id": "d2", "text": "Cars need regular engine oil and maintenance."},
],
"top_k": 3,
}),
options=Options(
context={
"retrieve_backend": "bm25s",
"query_text": "cat pet",
"corpus": [
{"doc_id": "d1", "text": "A cat is an independent and curious pet."},
{"doc_id": "d2", "text": "Cars need regular engine oil and maintenance."},
],
"top_k": 3,
}
),
)
results = mlodaAPI.run_all(
[feature],
Expand Down
Loading
Loading