From 9e16e8dc988bf54efed2ea4bb902574b49451aff Mon Sep 17 00:00:00 2001 From: Yiorgis Gozadinos Date: Tue, 9 Dec 2025 17:42:18 +0200 Subject: [PATCH] Fix text_context_radius references --- docs/inspector.md | 2 +- docs/python.md | 6 +++--- tests/test_context_enhancement.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/inspector.md b/docs/inspector.md index 406a36a2..a5250821 100644 --- a/docs/inspector.md +++ b/docs/inspector.md @@ -61,7 +61,7 @@ Press `c` while viewing a chunk to open the context expansion modal: - Shows the expanded context that would be provided to the QA agent - Type-aware expansion: tables, code blocks, and lists expand to their complete structures -- Text content expands based on `text_context_radius` setting +- Text content expands based on `search.context_radius` setting - Includes metadata like source document, content type, and relevance score - Press `Esc` to close the modal diff --git a/docs/python.md b/docs/python.md index 4718ac3d..c8ff0412 100644 --- a/docs/python.md +++ b/docs/python.md @@ -329,9 +329,9 @@ for result in expanded_results: Context expansion uses your configuration settings: -- **text_context_radius**: For text content (paragraphs), includes N chunks before and after -- **max_context_items**: Limits how many document items can be included -- **max_context_chars**: Hard limit on total characters +- **search.context_radius**: For text content (paragraphs), includes N DocItems before and after +- **search.max_context_items**: Limits how many document items can be included +- **search.max_context_chars**: Hard limit on total characters **Type-aware expansion**: Structural content (tables, code blocks, lists) automatically expands to include the complete structure, regardless of how it was split during chunking. diff --git a/tests/test_context_enhancement.py b/tests/test_context_enhancement.py index 36df90f6..b0722aec 100644 --- a/tests/test_context_enhancement.py +++ b/tests/test_context_enhancement.py @@ -391,7 +391,7 @@ async def test_search_result_get_primary_label(): @pytest.mark.asyncio async def test_expand_context_radius_zero(temp_db_path): """Test expand_context with radius 0 returns original results.""" - # Default config has text_context_radius=0 + # Default config has context_radius=0 async with HaikuRAG(temp_db_path, create=True) as client: doc = await client.create_document(content="Simple test content") assert doc.id is not None