From 0d1984dd8cf5e0d0a0c1d00629093f5b94057428 Mon Sep 17 00:00:00 2001 From: AviralAv03 Date: Sat, 11 Apr 2026 20:35:08 +0530 Subject: [PATCH 1/2] docs: add simple usage example for retrieval_core task --- docs/usage/retrieval_core.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 docs/usage/retrieval_core.md diff --git a/docs/usage/retrieval_core.md b/docs/usage/retrieval_core.md new file mode 100644 index 0000000..9cfd797 --- /dev/null +++ b/docs/usage/retrieval_core.md @@ -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 tests how quickly and accurately it can find specific words across those documents. +Instead of checking every single file, it uses math to sample just a few of them to guess the results quickly. This is great for testing how well a system handles searching through lots of text. +## Example Script +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) \ No newline at end of file From a21e2db46a80daf1a533202033e687aa48a2c8f6 Mon Sep 17 00:00:00 2001 From: AviralAv03 Date: Sat, 11 Apr 2026 20:52:23 +0530 Subject: [PATCH 2/2] docs: clarify probabilistic wording based on review --- docs/usage/retrieval_core.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/usage/retrieval_core.md b/docs/usage/retrieval_core.md index 9cfd797..8065e5e 100644 --- a/docs/usage/retrieval_core.md +++ b/docs/usage/retrieval_core.md @@ -1,7 +1,7 @@ # 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 tests how quickly and accurately it can find specific words across those documents. -Instead of checking every single file, it uses math to sample just a few of them to guess the results quickly. This is great for testing how well a system handles searching through lots of text. +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 Here's how you can run the task in Python to generate some fake data and solve it: ```python