Skip to content
Open
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
14 changes: 14 additions & 0 deletions docs/usage/retrieval_core.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Retrieval Core Task Usage
## What it does
The `retrieval_core` task acts like a mini search engine. It generates a bunch of fake text documents and then calculates how many times specific words appear across those documents.
Instead of checking every single file, it uses math to sample just a few of them to estimate the final results. This is great for testing probabilistic search approximations.
## Example Script

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add demo screenshot of this script in the PR

Here's how you can run the task in Python to generate some fake data and solve it:
```python
from chuck.tasks import retrieval_core
# 1. Generate 100 fake documents
payload = retrieval_core.generate(count=100, seed=42)
# 2. Run the task to search through them
solution = retrieval_core.solve(payload)
# 3. Check the results
print(solution)
Loading