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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,6 @@ test_stage6_interactive.ipynb

# Secrets / local config
.env

# python
.venv
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"---\n",
"Visually, context can contain something like this:\n",
"\n",
"![Context engineering overview](../public/ce-overview.png)\n"
"![Context engineering overview](../../public/ce-overview.png)\n"
]
},
{
Expand Down Expand Up @@ -1040,7 +1040,7 @@
"\n",
"That remaining space (111,900) might look comforting but remember this is just one turn. \n",
"\n",
"![Context engineering overview](../public/agents-token-hungry.png)\n",
"![Context engineering overview](../../public/agents-token-hungry.png)\n",
"\n",
"\n",
"- Our inputs will likely only grow longer (especially around conversation history), and as they do models have a harder time producing effective results.\n",
Expand All @@ -1060,7 +1060,7 @@
"4. **Placement & structure matter**: Models attend unevenly across the window; key facts can be missed when buried. We should surface essentials early, chunk clearly, and summarize instead of pasting raw dumps. \n",
"\n",
"\n",
"![Context engineering overview](../public/chroma_distractors.png)\n",
"![Context engineering overview](../../public/chroma_distractors.png)\n",
"\n",
"**Figure**: Performance degradation with context length. \n",
"*Source: Adapted from \"Many-Shot In-Context Learning in Multimodal Foundation Models\" \n",
Expand All @@ -1084,7 +1084,7 @@
"## Other Challenges\n",
"\n",
"\n",
"![Context engineering overview](../public/context-problems.png)\n",
"![Context engineering overview](../../public/context-problems.png)\n",
"\n",
"While managing the size of your context window is critical, simply fitting everything in isn't the only hurdle. As D. Breunig highlights in [How Contexts Fail (and How to Fix Them)](https://www.dbreunig.com/2025/06/22/how-contexts-fail-and-how-to-fix-them.html), there are several other ways that context can degrade the performance of your agent, even when you are well within the token limits.\n",
"\n",
Expand Down
6,269 changes: 54 additions & 6,215 deletions materials/ws/notebooks/01/baseline_rag.ipynb

Large diffs are not rendered by default.

35 changes: 2 additions & 33 deletions materials/ws/notebooks/01/data_engineered_rag.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,6 @@
"execution_count": 1,
"id": "3ffa9c24",
"metadata": {
"execution": {
"iopub.execute_input": "2026-03-25T21:04:52.050206Z",
"iopub.status.busy": "2026-03-25T21:04:52.050102Z",
"iopub.status.idle": "2026-03-25T21:04:52.055169Z",
"shell.execute_reply": "2026-03-25T21:04:52.054539Z"
},
"jupyter": {
"source_hidden": true
},
"tags": [
"setup"
]
Expand Down Expand Up @@ -95,15 +86,6 @@
"id": "e37ed621",
"metadata": {
"editable": true,
"execution": {
"iopub.execute_input": "2026-03-25T21:04:52.056694Z",
"iopub.status.busy": "2026-03-25T21:04:52.056591Z",
"iopub.status.idle": "2026-03-25T21:04:53.269092Z",
"shell.execute_reply": "2026-03-25T21:04:53.268706Z"
},
"jupyter": {
"source_hidden": true
},
"slideshow": {
"slide_type": ""
},
Expand All @@ -116,20 +98,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Initializing Data-Engineered RAG Agent...\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Hierarchical courses not found at /Users/nitin.kanukolanu/workspace/lab-contexteng/materials/ws/progressive_agents/src/redis_context_course/data/hierarchical/hierarchical_courses.json\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Initializing Data-Engineered RAG Agent...\n",
"Agent is ready!\n"
]
}
Expand Down Expand Up @@ -886,7 +855,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.13.7"
"version": "3.12.8"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
# Suppress httpx INFO logs
logging.getLogger("httpx").setLevel(logging.WARNING)
from langchain_core.messages import HumanMessage

from redis_context_course import CourseManager
from redis_context_course.hierarchical_context import RawContextAssembler
from redis_context_course.hierarchical_models import HierarchicalCourse
Expand Down Expand Up @@ -68,7 +67,8 @@ def initialize_nodes(manager: CourseManager):
# Load hierarchical courses with full syllabi
try:
data_path = (
Path(__file__).parent.parent.parent / "src"
Path(__file__).parent.parent.parent.parent
/ "src"
/ "redis_context_course"
/ "data"
/ "hierarchical"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ def initialize_nodes(manager: CourseManager):
# Load hierarchical courses
try:
data_path = (
Path(__file__).parent.parent.parent / "src"
Path(__file__).parent.parent.parent.parent
/ "src"
/ "redis_context_course"
/ "data"
/ "hierarchical"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@
from pydantic import BaseModel, Field
from redis_context_course import CourseManager
from redis_context_course.hierarchical_context import HierarchicalContextAssembler
from redis_context_course.hierarchical_models import (
CourseSummary,
HierarchicalCourse,
)
from redis_context_course.hierarchical_models import CourseSummary, HierarchicalCourse
from redis_context_course.models import Course

# Configure logger
Expand All @@ -47,7 +44,8 @@ def initialize_tools(manager: CourseManager):
# Load hierarchical courses with full syllabi
try:
data_path = (
Path(__file__).parent.parent.parent / "src"
Path(__file__).parent.parent.parent.parent
/ "src"
/ "redis_context_course"
/ "data"
/ "hierarchical"
Expand Down Expand Up @@ -216,11 +214,11 @@ def search_courses_sync(
format=basic_course.format,
instructor=basic_course.instructor,
short_description=basic_course.description[:200],
prerequisite_codes=[
p.course_code for p in basic_course.prerequisites
]
if basic_course.prerequisites
else [],
prerequisite_codes=(
[p.course_code for p in basic_course.prerequisites]
if basic_course.prerequisites
else []
),
tags=[],
)
summaries.append(summary)
Expand Down Expand Up @@ -316,11 +314,11 @@ async def search_courses(
format=basic_course.format,
instructor=basic_course.instructor,
short_description=basic_course.description[:200],
prerequisite_codes=[
p.course_code for p in basic_course.prerequisites
]
if basic_course.prerequisites
else [],
prerequisite_codes=(
[p.course_code for p in basic_course.prerequisites]
if basic_course.prerequisites
else []
),
tags=[],
)
summaries.append(summary)
Expand Down
3 changes: 3 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ else
echo "Copied ./all to ./dist/"
fi

# Copy doc assets (e.g. redis_logo.png) into the served static site
cp -r ./doc/ ./dist/client/

docker-compose up -d --scale jupyter=0 --scale docs=0

echo "Waiting for litellm to be ready (healthcheck)..."
Expand Down
Loading