Technologic101 commited on
Commit
caba535
·
1 Parent(s): fc083dc

task: changes rag test

Browse files
Files changed (1) hide show
  1. src/graph.ipynb +30 -16
src/graph.ipynb CHANGED
@@ -31,19 +31,33 @@
31
  "text": [
32
  "Loaded 82 design documents\n",
33
  "Testing RAG retriever with requirements:\n",
34
- "----------------------------------------\n"
35
- ]
36
- },
37
- {
38
- "ename": "AttributeError",
39
- "evalue": "'set' object has no attribute 'items'",
40
- "output_type": "error",
41
- "traceback": [
42
- "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
43
- "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)",
44
- "Cell \u001b[0;32mIn[2], line 25\u001b[0m\n\u001b[1;32m 22\u001b[0m \u001b[38;5;28mprint\u001b[39m(results)\n\u001b[1;32m 24\u001b[0m \u001b[38;5;66;03m# Run the test\u001b[39;00m\n\u001b[0;32m---> 25\u001b[0m \u001b[38;5;28;01mawait\u001b[39;00m test_rag()\n",
45
- "Cell \u001b[0;32mIn[2], line 16\u001b[0m, in \u001b[0;36mtest_rag\u001b[0;34m()\u001b[0m\n\u001b[1;32m 14\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mTesting RAG retriever with requirements:\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m 15\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m----------------------------------------\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[0;32m---> 16\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m key, value \u001b[38;5;129;01min\u001b[39;00m \u001b[43mtest_requirements\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mitems\u001b[49m():\n\u001b[1;32m 17\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mkey\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m: \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mvalue\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m 18\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[38;5;124mRetrieved Designs:\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n",
46
- "\u001b[0;31mAttributeError\u001b[0m: 'set' object has no attribute 'items'"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  ]
48
  }
49
  ],
@@ -56,8 +70,8 @@
56
  "#design_retriever = DesignRetrieverTool(rag=design_rag)\n",
57
  "\n",
58
  "test_requirements = {\n",
59
- " \"I'm looking for something modern and space-themed, designed to appeal to adventurers, young people, and science enthusiasts\"\n",
60
- "}\n",
61
  "\n",
62
  "# Test the retriever\n",
63
  "async def test_rag():\n",
@@ -65,7 +79,7 @@
65
  " print(\"\\nRetrieved Designs:\")\n",
66
  " print(\"----------------------------------------\")\n",
67
  " \n",
68
- " results = await design_rag.query_similar_designs(test_requirements)\n",
69
  " print(results)\n",
70
  "\n",
71
  "# Run the test\n",
 
31
  "text": [
32
  "Loaded 82 design documents\n",
33
  "Testing RAG retriever with requirements:\n",
34
+ "\n",
35
+ "Retrieved Designs:\n",
36
+ "----------------------------------------\n",
37
+ "Generated query: \"vintage classic easy to use grandmother love design\"\n",
38
+ "Design 180:\n",
39
+ "Description: This design employs a vintage newspaper aesthetic with a classic serif typography that evokes an old-world charm, utilizing sepia-toned paper backgrounds to enhance its nostalgic feel. The layout is text-heavy with a deliberate obfuscation, reflecting a layered collage effect. Its balanced placement keeps the focus central, inviting closer inspection and interaction.\n",
40
+ "Categories: Vintage, Nostalgic, Typography, Collage, Editorial\n",
41
+ "Visual Characteristics: Sepia tone, Serif typography, Textured background, Layered elements, Central focus\n",
42
+ "URL: https://csszengarden.com/180\n",
43
+ "\n",
44
+ "Design 182:\n",
45
+ "Description: The design creatively utilizes a retro theme with vinyl records as the prominent visual element to evoke a sense of nostalgia and classic style, complemented by a muted green color palette that brings harmony and balance. Handwritten and vintage-style typography enhance the retro aesthetic, while background illustrations and decorative elements like stars add whimsy and depth to the composition.\n",
46
+ "Categories: Retro, Nostalgic, Music-themed, Decorative, Vintage\n",
47
+ "Visual Characteristics: Vinyl Records, Muted Green Palette, Handwritten Typography, Background Illustrations, Decorative Elements\n",
48
+ "URL: https://csszengarden.com/182\n",
49
+ "\n",
50
+ "Design 194:\n",
51
+ "Description: This design exudes a minimalist elegance with a muted, earthy color palette and a clean layout, embodying a sense of calm and sophistication. The subtle use of textures and classic serif typography enhances the refined aesthetic, while the centered alignment and generous spacing contribute to a relaxed readability. The incorporation of a delicate floral illustration adds a touch of organic charm, making the design feel both timeless and inviting.\n",
52
+ "Categories: Minimalism, Elegant, Organic, Sophisticated, Classic\n",
53
+ "Visual Characteristics: Muted Color Palette, Serif Typography, Centered Layout, Generous Spacing, Floral Illustration\n",
54
+ "URL: https://csszengarden.com/194\n",
55
+ "\n",
56
+ "Design 212:\n",
57
+ "Description: The design features a retro aesthetic using a muted color palette of browns and creams, creating a nostalgic and vintage feel. The asymmetrical layout and bold typography contribute to the visual hierarchy, guiding the viewer through the content effortlessly. Illustrations with a mid-century modern style add character, merging traditional design elements with contemporary functionality.\n",
58
+ "Categories: Retro, Typography, Illustration, Vintage Style, Educational\n",
59
+ "Visual Characteristics: Muted Color Palette, Asymmetrical Layout, Bold Typography, Retro Illustrations, Functional Design\n",
60
+ "URL: https://csszengarden.com/212\n"
61
  ]
62
  }
63
  ],
 
70
  "#design_retriever = DesignRetrieverTool(rag=design_rag)\n",
71
  "\n",
72
  "test_requirements = {\n",
73
+ " \"I want a design that is vintage and classic, something easy to use that a grandmother would love\"\n",
74
+ " }\n",
75
  "\n",
76
  "# Test the retriever\n",
77
  "async def test_rag():\n",
 
79
  " print(\"\\nRetrieved Designs:\")\n",
80
  " print(\"----------------------------------------\")\n",
81
  " \n",
82
+ " results = await design_rag.query_similar_designs(test_requirements, 2)\n",
83
  " print(results)\n",
84
  "\n",
85
  "# Run the test\n",