Skip to content

Commit 43435f7

Browse files
nbval
1 parent b9ef50f commit 43435f7

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

python-recipes/RAG/07_user_role_based_rag.ipynb

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,9 @@
880880
"id": "qQS1BLwGBVDA"
881881
},
882882
"source": [
883-
"### Search examples"
883+
"### Search examples\n",
884+
"\n",
885+
"Search with a non-existent user."
884886
]
885887
},
886888
{
@@ -911,10 +913,17 @@
911913
],
912914
"source": [
913915
"# NBVAL_SKIP\n",
914-
"# Search with a non-existent user\n",
915916
"results = user_query(\"tyler\", query=\"What is the make and model of the vehicle here?\")"
916917
]
917918
},
919+
{
920+
"cell_type": "markdown",
921+
"id": "0af59693",
922+
"metadata": {},
923+
"source": [
924+
"Create user for Tyler."
925+
]
926+
},
918927
{
919928
"cell_type": "code",
920929
"execution_count": 15,
@@ -947,7 +956,6 @@
947956
],
948957
"source": [
949958
"# NBVAL_SKIP\n",
950-
"# Create user for Tyler\n",
951959
"tyler = User(redis_client, \"tyler\", roles=[\"sales\", \"engineering\"])\n",
952960
"tyler.create()"
953961
]
@@ -1047,6 +1055,14 @@
10471055
"results[:3]"
10481056
]
10491057
},
1058+
{
1059+
"cell_type": "markdown",
1060+
"id": "454ce79b",
1061+
"metadata": {},
1062+
"source": [
1063+
"Search with a valid user, but incorrect roles."
1064+
]
1065+
},
10501066
{
10511067
"cell_type": "code",
10521068
"execution_count": 19,
@@ -1084,7 +1100,6 @@
10841100
],
10851101
"source": [
10861102
"# NBVAL_SKIP\n",
1087-
"# Query with valid user, different roles\n",
10881103
"print(alice, \"\\n\")\n",
10891104
"\n",
10901105
"# Query with valid user\n",

0 commit comments

Comments
 (0)