// Generated by orrery. Edit the diagram spec and re-render instead of editing this file.
import { type SVGProps, useId } from "react";

export default function RetrievalAugmentedGenerationWithOpenComponents(props: SVGProps<SVGSVGElement>) {
  const uid = useId().replace(/[^A-Za-z0-9_-]/g, "");
  return (
    <svg xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink" width="875" height="1021" viewBox="0 0 875 1021" role="img" aria-labelledby={`${uid}-sdw-title ${uid}-sdw-desc`} fontFamily="Inter, 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif" {...props}>
      <title id={`${uid}-sdw-title`}>
        Retrieval-augmented generation with open components
      </title>
      <desc id={`${uid}-sdw-desc`}>
        Retrieval-augmented generation with open components. 14 components in 2 groups. Connections: Documents to Loaders; Loaders to Chunking; Chunking to Embedding; Embedding to bge-m3 (embed chunks); Embedding to Qdrant (upsert); User to React; React to FastAPI (POST /chat); FastAPI to LangChain; FastAPI to Redis (cache lookup); bge-m3 to LangChain (embed query); Qdrant to LangChain (search); LangChain to Ollama (prompt and context); LangChain to Hosted model API (alternative); LangChain to Langfuse (traces).
      </desc>
      <defs>
        <symbol id={`${uid}-s1`} viewBox="0 0 24 24" overflow="visible">
          <g fill="none" stroke="#000000" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2">
            <path d="M15 3v4a1 1 0 0 0 1 1h4" />
            <path d="M18 17h-7a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4l5 5v7a2 2 0 0 1-2 2" />
            <path d="M16 17v2a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h2" />
          </g>
        </symbol>
        <symbol id={`${uid}-s2`} viewBox="0 0 24 24" overflow="visible">
          <g fill="none" stroke="#000000" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2">
            <path d="M14 3v4a1 1 0 0 0 1 1h4" />
            <path d="M5 13V5a2 2 0 0 1 2-2h7l5 5v11a2 2 0 0 1-2 2h-5.5M2 19h7m-3-3l3 3l-3 3" />
          </g>
        </symbol>
        <symbol id={`${uid}-s3`} viewBox="0 0 24 24" overflow="visible">
          <g fill="none" stroke="#000000" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2">
            <path d="M14 3v4a1 1 0 0 0 1 1h4" />
            <path d="M17 21H7a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7l5 5v11a2 2 0 0 1-2 2" />
            <path d="M14 17a1 1 0 1 0 2 0a1 1 0 1 0-2 0m-6 0a1 1 0 1 0 2 0a1 1 0 1 0-2 0m1 0l6-6m0 6l-6-6" />
          </g>
        </symbol>
        <symbol id={`${uid}-s4`} viewBox="0 0 24 24" overflow="visible">
          <path fill="none" stroke="#000000" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="m3 20l9-7m0-10v10l9 7m-4-8v.015m0-8v.015m4 3.985v.015m-9 10.985v.015m-9-7.015v.015m4-4.015v.015M3 4.015v.015" />
        </symbol>
        <symbol id={`${uid}-s5`} viewBox="0 0 24 24" overflow="visible">
          <g fill="none" stroke="#000000" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2">
            <path d="M15.5 13a3.5 3.5 0 0 0-3.5 3.5v1a3.5 3.5 0 0 0 7 0v-1.8M8.5 13a3.5 3.5 0 0 1 3.5 3.5v1a3.5 3.5 0 0 1-7 0v-1.8" />
            <path d="M17.5 16a3.5 3.5 0 0 0 0-7H17" />
            <path d="M19 9.3V6.5a3.5 3.5 0 0 0-7 0M6.5 16a3.5 3.5 0 0 1 0-7H7" />
            <path d="M5 9.3V6.5a3.5 3.5 0 0 1 7 0v10" />
          </g>
        </symbol>
        <symbol id={`${uid}-s6`} viewBox="0 0 256 296" overflow="visible">
          <defs>
            <linearGradient id={`${uid}-s6-_SVGAzz3ndTH`} x1="81.562%" x2="-18.086%" y1="44.842%" y2="44.842%">
              <stop offset="0%" stopColor="#ff3364" />
              <stop offset="100%" stopColor="#c91540" stopOpacity="0" />
            </linearGradient>
          </defs>
          <path fill="#24386c" d="m201.317 271.722l-5.894-162.509l-10.675-42.845L256 73.911v196.582l-43.525 25.12z" />
          <path fill="#7589be" d="M255.995 73.9L212.47 99.037l-89.82-19.702L17.516 122.14L0 73.9l63.988-36.95L127.996 0l63.99 36.95z" />
          <path fill="#b2bfe8" d="m.003 73.9l43.525 25.137l25.231 75.037l85.19 68.162l-25.948 53.363l-64.008-36.952l-63.99-36.95V73.898" />
          <path fill="#24386c" d="m156.857 202.807l-28.856 42.54v50.256l40.946-23.625l21.097-31.503" />
          <path fill="#7589be" d="m128.019 195.107l-40.963-70.922l8.823-23.507l33.542-16.262l39.525 39.77z" />
          <path fill="#b2bfe8" d="m87.056 124.179l40.945 23.625v47.288l-37.869 1.629l-22.907-29.25z" />
          <path fill="#24386c" d="m128.001 147.8l40.946-23.623l27.866 46.4l-33.722 27.862l-35.09-3.35z" />
          <path fill="#dc244c" d="m168.947 271.975l43.525 23.626V99.04l-42.245-24.38L128 50.276L85.756 74.658L43.53 99.04v97.542l42.226 24.381l42.245 24.383l40.946-23.646zm0-100.531L128 195.088l-40.945-23.644v-47.269L128 100.531l40.946 23.644z" />
          <path fill={`url(#${uid}-s6-_SVGAzz3ndTH)`} d="M128.019 245.363v-50.264l-40.733-23.442v50.18z" />
        </symbol>
        <symbol id={`${uid}-s7`} viewBox="0 0 24 24" overflow="visible">
          <path fill="none" stroke="#000000" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0-8 0M6 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2" />
        </symbol>
        <symbol id={`${uid}-s8`} viewBox="0 0 256 228" overflow="visible">
          <path fill="#00d8ff" d="M210.483 73.824a172 172 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171 171 0 0 0-6.375 5.848a156 156 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a171 171 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a146 146 0 0 0 6.921 2.165a168 168 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a146 146 0 0 0 5.342-4.923a168 168 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145 145 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844m-6.365 70.984q-2.102.694-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14m-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a157 157 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345q.785 3.162 1.386 6.193M87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a157 157 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a135 135 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94M50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a135 135 0 0 1-6.318-1.979m12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144 144 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160 160 0 0 1-1.76-7.887m110.427 27.268a348 348 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381 381 0 0 0-7.365-13.322m-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322 322 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18M82.802 87.83a323 323 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a322 322 0 0 0-7.848 12.897m8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321 321 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147m37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486m52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382 382 0 0 0 7.859-13.026a347 347 0 0 0 7.425-13.565m-16.898 8.101a359 359 0 0 1-12.281 19.815a329 329 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310 310 0 0 1-12.513-19.846h.001a307 307 0 0 1-10.923-20.627a310 310 0 0 1 10.89-20.637l-.001.001a307 307 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329 329 0 0 1 12.335 19.695a359 359 0 0 1 11.036 20.54a330 330 0 0 1-11 20.722m22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026q-.518 2.504-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a161 161 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3M128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86" />
        </symbol>
        <symbol id={`${uid}-s9`} viewBox="0 0 256 256" overflow="visible">
          <path fill="#009688" d="M128 0C57.33 0 0 57.33 0 128s57.33 128 128 128s128-57.33 128-128S198.67 0 128 0m-6.67 230.605v-80.288H76.699l64.128-124.922v80.288h42.966z" />
        </symbol>
        <symbol id={`${uid}-s10`} viewBox="0 0 256 256" overflow="visible">
          <path d="M142.391 152.139a80.37 80.37 0 0 1 56.797 23.527L256 232.471A80.4 80.4 0 0 1 199.195 256a80.38 80.38 0 0 1-56.804-23.528l-56.805-56.805a80.4 80.4 0 0 1 56.805-23.527m-61.923 23.394v80.333a80.4 80.4 0 0 1-56.805-23.528A80.4 80.4 0 0 1 .13 175.533zM23.526 0L80.33 56.799a80.4 80.4 0 0 1 23.526 56.806A80.36 80.36 0 0 1 80.33 170.41l-56.804-56.799A80.4 80.4 0 0 1 0 56.806A80.4 80.4 0 0 1 23.526 0m140.783 68.152a80.36 80.36 0 0 1 56.812 23.526l-56.812 56.814l-56.804-56.806a80.37 80.37 0 0 1 56.804-23.534" />
        </symbol>
        <symbol id={`${uid}-s11`} viewBox="0 0 256 220" overflow="visible">
          <path fill="#912626" d="M245.97 168.943c-13.662 7.121-84.434 36.22-99.501 44.075s-23.437 7.78-35.34 2.09c-11.902-5.69-87.216-36.112-100.783-42.597C3.566 169.271 0 166.535 0 163.951v-25.876s98.05-21.345 113.879-27.024c15.828-5.679 21.32-5.884 34.79-.95c13.472 4.936 94.018 19.468 107.331 24.344l-.006 25.51c.002 2.558-3.07 5.364-10.024 8.988" />
          <path fill="#c6302b" d="M245.965 143.22c-13.661 7.118-84.431 36.218-99.498 44.072c-15.066 7.857-23.436 7.78-35.338 2.09c-11.903-5.686-87.214-36.113-100.78-42.594c-13.566-6.485-13.85-10.948-.524-16.166c13.326-5.22 88.224-34.605 104.055-40.284c15.828-5.677 21.319-5.884 34.789-.948c13.471 4.934 83.819 32.935 97.13 37.81c13.316 4.881 13.827 8.9.166 16.02" />
          <path fill="#912626" d="M245.97 127.074c-13.662 7.122-84.434 36.22-99.501 44.078c-15.067 7.853-23.437 7.777-35.34 2.087c-11.903-5.687-87.216-36.112-100.783-42.597C3.566 127.402 0 124.67 0 122.085V96.206s98.05-21.344 113.879-27.023c15.828-5.679 21.32-5.885 34.79-.95C162.142 73.168 242.688 87.697 256 92.574l-.006 25.513c.002 2.557-3.07 5.363-10.024 8.987" />
          <path fill="#c6302b" d="M245.965 101.351c-13.661 7.12-84.431 36.218-99.498 44.075c-15.066 7.854-23.436 7.777-35.338 2.087c-11.903-5.686-87.214-36.112-100.78-42.594c-13.566-6.483-13.85-10.947-.524-16.167C23.151 83.535 98.05 54.148 113.88 48.47c15.828-5.678 21.319-5.884 34.789-.949c13.471 4.934 83.819 32.933 97.13 37.81c13.316 4.88 13.827 8.9.166 16.02" />
          <path fill="#912626" d="M245.97 83.653c-13.662 7.12-84.434 36.22-99.501 44.078c-15.067 7.854-23.437 7.777-35.34 2.087c-11.903-5.687-87.216-36.113-100.783-42.595C3.566 83.98 0 81.247 0 78.665v-25.88s98.05-21.343 113.879-27.021c15.828-5.68 21.32-5.884 34.79-.95C162.142 29.749 242.688 44.278 256 49.155l-.006 25.512c.002 2.555-3.07 5.361-10.024 8.986" />
          <path fill="#c6302b" d="M245.965 57.93c-13.661 7.12-84.431 36.22-99.498 44.074c-15.066 7.854-23.436 7.777-35.338 2.09C99.227 98.404 23.915 67.98 10.35 61.497S-3.5 50.55 9.825 45.331C23.151 40.113 98.05 10.73 113.88 5.05c15.828-5.679 21.319-5.883 34.789-.948s83.819 32.934 97.13 37.811c13.316 4.876 13.827 8.897.166 16.017" />
          <path fill="#fff" d="m159.283 32.757l-22.01 2.285l-4.927 11.856l-7.958-13.23l-25.415-2.284l18.964-6.839l-5.69-10.498l17.755 6.944l16.738-5.48l-4.524 10.855zm-28.251 57.518L89.955 73.238l58.86-9.035zm-56.95-50.928c17.375 0 31.46 5.46 31.46 12.194c0 6.736-14.085 12.195-31.46 12.195s-31.46-5.46-31.46-12.195c0-6.734 14.085-12.194 31.46-12.194" />
          <path fill="#621b1c" d="m185.295 35.998l34.836 13.766l-34.806 13.753z" />
          <path fill="#9a2928" d="m146.755 51.243l38.54-15.245l.03 27.519l-3.779 1.478z" />
        </symbol>
        <symbol id={`${uid}-s12`} viewBox="0 0 24 24" overflow="visible">
          <path fill="#000000" d="M16.361 10.26a.9.9 0 0 0-.558.47l-.072.148l.001.207c0 .193.004.217.059.353c.076.193.152.312.291.448c.24.238.51.3.872.205a.86.86 0 0 0 .517-.436a.75.75 0 0 0 .08-.498c-.064-.453-.33-.782-.724-.897a1.1 1.1 0 0 0-.466 0m-9.203.005c-.305.096-.533.32-.65.639a1.2 1.2 0 0 0-.06.52c.057.309.31.59.598.667c.362.095.632.033.872-.205c.14-.136.215-.255.291-.448c.055-.136.059-.16.059-.353l.001-.207l-.072-.148a.9.9 0 0 0-.565-.472a1 1 0 0 0-.474.007m4.184 2c-.131.071-.223.25-.195.383c.031.143.157.288.353.407c.105.063.112.072.117.136c.004.038-.01.146-.029.243c-.02.094-.036.194-.036.222c.002.074.07.195.143.253c.064.052.076.054.255.059c.164.005.198.001.264-.03c.169-.082.212-.234.15-.525c-.052-.243-.042-.28.087-.355c.137-.08.281-.219.324-.314a.365.365 0 0 0-.175-.48a.4.4 0 0 0-.181-.033c-.126 0-.207.03-.355.124l-.085.053l-.053-.032c-.219-.13-.259-.145-.391-.143a.4.4 0 0 0-.193.032m.39-2.195c-.373.036-.475.05-.654.086a4.5 4.5 0 0 0-.951.328c-.94.46-1.589 1.226-1.787 2.114c-.04.176-.045.234-.045.53c0 .294.005.357.043.524c.264 1.16 1.332 2.017 2.714 2.173c.3.033 1.596.033 1.896 0c1.11-.125 2.064-.727 2.493-1.571c.114-.226.169-.372.22-.602c.039-.167.044-.23.044-.523c0-.297-.005-.355-.045-.531c-.288-1.29-1.539-2.304-3.072-2.497a7 7 0 0 0-.855-.031zm.645.937a3.3 3.3 0 0 1 1.44.514c.223.148.537.458.671.662c.166.251.26.508.303.82c.02.143.01.251-.043.482c-.08.345-.332.705-.672.957a3 3 0 0 1-.689.348c-.382.122-.632.144-1.525.138c-.582-.006-.686-.01-.853-.042q-.856-.16-1.35-.68c-.264-.28-.385-.535-.45-.946c-.03-.192.025-.509.137-.776c.136-.326.488-.73.836-.963c.403-.269.934-.46 1.422-.512c.187-.02.586-.02.773-.002m-5.503-11a1.65 1.65 0 0 0-.683.298C5.617.74 5.173 1.666 4.985 2.819c-.07.436-.119 1.04-.119 1.503c0 .544.064 1.24.155 1.721c.02.107.031.202.023.208l-.187.152a5.3 5.3 0 0 0-.949 1.02a5.5 5.5 0 0 0-.94 2.339a6.6 6.6 0 0 0-.023 1.357c.091.78.325 1.438.727 2.04l.13.195l-.037.064c-.269.452-.498 1.105-.605 1.732c-.084.496-.095.629-.095 1.294c0 .67.009.803.088 1.266c.095.555.288 1.143.503 1.534c.071.128.243.393.264.407c.007.003-.014.067-.046.141a7.4 7.4 0 0 0-.548 1.873a5 5 0 0 0-.071.991c0 .56.031.832.148 1.279L3.42 24h1.478l-.05-.091c-.297-.552-.325-1.575-.068-2.597c.117-.472.25-.819.498-1.296l.148-.29v-.177c0-.165-.003-.184-.057-.293a.9.9 0 0 0-.194-.25a1.7 1.7 0 0 1-.385-.543c-.424-.92-.506-2.286-.208-3.451c.124-.486.329-.918.544-1.154a.8.8 0 0 0 .223-.531c0-.195-.07-.355-.224-.522a3.14 3.14 0 0 1-.817-1.729c-.14-.96.114-2.005.69-2.834c.563-.814 1.353-1.336 2.237-1.475c.199-.033.57-.028.776.01c.226.04.367.028.512-.041c.179-.085.268-.19.374-.431c.093-.215.165-.333.36-.576c.234-.29.46-.489.822-.729c.413-.27.884-.467 1.352-.561c.17-.035.25-.04.569-.04s.398.005.569.04a4.07 4.07 0 0 1 1.914.997c.117.109.398.457.488.602c.034.057.095.177.132.267c.105.241.195.346.374.43c.14.068.286.082.503.045c.343-.058.607-.053.943.016c1.144.23 2.14 1.173 2.581 2.437c.385 1.108.276 2.267-.296 3.153c-.097.15-.193.27-.333.419c-.301.322-.301.722-.001 1.053c.493.539.801 1.866.708 3.036c-.062.772-.26 1.463-.533 1.854a2 2 0 0 1-.224.258a.9.9 0 0 0-.194.25c-.054.109-.057.128-.057.293v.178l.148.29c.248.476.38.823.498 1.295c.253 1.008.231 2.01-.059 2.581a1 1 0 0 0-.044.098c0 .006.329.009.732.009h.73l.02-.074l.036-.134c.019-.076.057-.3.088-.516a9 9 0 0 0 0-1.258c-.11-.875-.295-1.57-.597-2.226c-.032-.074-.053-.138-.046-.141a1.4 1.4 0 0 0 .108-.152c.376-.569.607-1.284.724-2.228c.031-.26.031-1.378 0-1.628c-.083-.645-.182-1.082-.348-1.525a6 6 0 0 0-.329-.7l-.038-.064l.131-.194c.402-.604.636-1.262.727-2.04a6.6 6.6 0 0 0-.024-1.358a5.5 5.5 0 0 0-.939-2.339a5.3 5.3 0 0 0-.95-1.02l-.186-.152a.7.7 0 0 1 .023-.208c.208-1.087.201-2.443-.017-3.503c-.19-.924-.535-1.658-.98-2.082c-.354-.338-.716-.482-1.15-.455c-.996.059-1.8 1.205-2.116 3.01a7 7 0 0 0-.097.726c0 .036-.007.066-.015.066a1 1 0 0 1-.149-.078A4.86 4.86 0 0 0 12 3.03c-.832 0-1.687.243-2.456.698a1 1 0 0 1-.148.078c-.008 0-.015-.03-.015-.066a7 7 0 0 0-.097-.725C8.997 1.392 8.337.319 7.46.048a2 2 0 0 0-.585-.041Zm.293 1.402c.248.197.523.759.682 1.388c.03.113.06.244.069.292c.007.047.026.152.041.233c.067.365.098.76.102 1.24l.002.475l-.12.175l-.118.178h-.278c-.324 0-.646.041-.954.124l-.238.06c-.033.007-.038-.003-.057-.144a8.4 8.4 0 0 1 .016-2.323c.124-.788.413-1.501.696-1.711c.067-.05.079-.049.157.013m9.825-.012c.17.126.358.46.498.888c.28.854.36 2.028.212 3.145c-.019.14-.024.151-.057.144l-.238-.06a3.7 3.7 0 0 0-.954-.124h-.278l-.119-.178l-.119-.175l.002-.474c.004-.669.066-1.19.214-1.772c.157-.623.434-1.185.68-1.382c.078-.062.09-.063.159-.012" />
        </symbol>
        <symbol id={`${uid}-s13`} viewBox="0 0 24 24" overflow="visible">
          <path fill="none" stroke="#000000" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M6.657 18C4.085 18 2 15.993 2 13.517s2.085-4.482 4.657-4.482c.393-1.762 1.794-3.2 3.675-3.773c1.88-.572 3.956-.193 5.444 1c1.488 1.19 2.162 3.007 1.77 4.769h.99c1.913 0 3.464 1.56 3.464 3.486s-1.551 3.487-3.465 3.487H6.657" />
        </symbol>
        <symbol id={`${uid}-s14`} viewBox="0 0 24 24" overflow="visible">
          <path fill="none" stroke="#000000" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M3 12h4l3 8l4-16l3 8h4" />
        </symbol>
      </defs>
      <rect width="875" height="1021" fill="#ffffff" />
      <text fontSize="20" fontWeight="600" fill="#000000">
        <tspan x="28" y="43.78">
          Retrieval-augmented generation with open components
        </tspan>
      </text>
      <text fontSize="13" fill="#5f6b7a">
        <tspan x="28" y="66.18">
          Documents are chunked and embedded into Qdrant; a FastAPI and LangChain backend retrieves context and answers with a local
        </tspan>
        <tspan x="28" y="83.08">
          Ollama model or a hosted one
        </tspan>
      </text>
      <g id={`${uid}-g-ingestion`}>
        <rect x="98" y="112.9" width="571" height="176" rx="10" fill="#f4f6f8" stroke="#888f99" strokeWidth="1" />
      </g>
      <g id={`${uid}-g-query`}>
        <rect x="28" y="555.9" width="641" height="176" rx="10" fill="#f4f6f8" stroke="#888f99" strokeWidth="1" />
      </g>
      <g id={`${uid}-e-e1`}>
        <path d="M213.5 196.9 L295.75 196.9" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" />
        <path d="M287.5 201.4 L296.5 196.9 L287.5 192.4" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-e-e2`}>
        <path d="M360.5 196.9 L427.75 196.9" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" />
        <path d="M419.5 201.4 L428.5 196.9 L419.5 192.4" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-e-e3`}>
        <path d="M492.5 196.9 L566.25 196.9" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" />
        <path d="M558 201.4 L567 196.9 L558 192.4" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-e-e4`}>
        <path d="M592 268.9 L592 362.15" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" />
        <path d="M587.5 353.9 L592 362.9 L596.5 353.9" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-e-e5`}>
        <path d="M631 196.9 L724 196.9 Q732 196.9 732 204.9 L732 369.65" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" />
        <path d="M727.5 361.4 L732 370.4 L736.5 361.4" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-e-e6`}>
        <path d="M112 639.9 L217.25 639.9" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" />
        <path d="M209 644.4 L218 639.9 L209 635.4" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-e-e7`}>
        <path d="M282 639.9 L387.25 639.9" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" />
        <path d="M379 644.4 L388 639.9 L379 635.4" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-e-e8`}>
        <path d="M452 639.9 L565.75 639.9" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" />
        <path d="M557.5 644.4 L566.5 639.9 L557.5 635.4" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-e-e9`}>
        <path d="M420 711.9 L420 805.15" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" />
        <path d="M415.5 796.9 L420 805.9 L424.5 796.9" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-e-e10`}>
        <path d="M592 482.65 L592 607.9" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" />
        <path d="M596.5 490.9 L592 481.9 L587.5 490.9" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-e-e11`}>
        <path d="M732 475.15 L732 624.9 Q732 632.9 724 632.9 L630.5 632.9" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" />
        <path d="M736.5 483.4 L732 474.4 L727.5 483.4" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-e-e12`}>
        <path d="M591.5 711.9 L591.5 829.9 Q591.5 837.9 583.5 837.9 L563.75 837.9" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" />
        <path d="M572 833.4 L563 837.9 L572 842.4" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-e-e13`}>
        <path d="M605.5 711.9 L605.5 829.9 Q605.5 837.9 613.5 837.9 L625.75 837.9" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" strokeDasharray="6 4" />
        <path d="M617.5 842.4 L626.5 837.9 L617.5 833.4" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-e-e14`}>
        <path d="M630.5 646.9 L792.5 646.9 Q800.5 646.9 800.5 654.9 L800.5 805.15" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" strokeDasharray="1.5 3.5" strokeLinecap="round" />
        <path d="M796 796.9 L800.5 805.9 L805 796.9" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-el-e4`}>
        <rect x="598" y="305.4" width="93" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="644.5" y="320.08">
            embed chunks
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e5`}>
        <rect x="738" y="273.15" width="47" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="761.5" y="287.83">
            upsert
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e7`}>
        <rect x="298" y="615.9" width="74" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="335" y="630.58">
            POST /chat
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e9`}>
        <rect x="426" y="748.4" width="86" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="469" y="763.08">
            cache lookup
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e10`}>
        <rect x="598" y="513.4" width="85" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="640.5" y="528.08">
            embed query
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e11`}>
        <rect x="738" y="543.15" width="49" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="762.5" y="557.83">
            search
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e12`}>
        <rect x="466.5" y="774.9" width="119" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="526" y="789.58">
            prompt and context
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e13`}>
        <rect x="611.5" y="764.4" width="70" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="646.5" y="779.08">
            alternative
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e14`}>
        <rect x="692.5" y="649.9" width="46" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="715.5" y="664.58">
            traces
          </tspan>
        </text>
      </g>
      <g id={`${uid}-gh-ingestion`}>
        <rect x="106" y="121.9" width="66.37" height="18.9" rx="3" fill="#f4f6f8" />
        <text fontSize="13" fontWeight="600" fill="#000000">
          <tspan x="110" y="136.08">
            Ingestion
          </tspan>
        </text>
      </g>
      <g id={`${uid}-gh-query`}>
        <rect x="36" y="564.9" width="46.5" height="18.9" rx="3" fill="#f4f6f8" />
        <text fontSize="13" fontWeight="600" fill="#000000">
          <tspan x="40" y="579.08">
            Query
          </tspan>
        </text>
      </g>
      <g id={`${uid}-n-docs`}>
        <use href={`#${uid}-s1`} x="149.5" y="164.9" width="64" height="64" />
        <text fontSize="13" fill="#000000" textAnchor="middle">
          <tspan x="181.5" y="248.08">
            Documents
          </tspan>
        </text>
        <text fontSize="11.5" fill="#5f6b7a" textAnchor="middle">
          <tspan x="181.5" y="265.48">
            PDF, HTML, Markdown
          </tspan>
        </text>
      </g>
      <g id={`${uid}-n-loaders`}>
        <use href={`#${uid}-s2`} x="296.5" y="164.9" width="64" height="64" />
        <text fontSize="13" fill="#000000" textAnchor="middle">
          <tspan x="328.5" y="248.08">
            Loaders
          </tspan>
        </text>
        <text fontSize="11.5" fill="#5f6b7a" textAnchor="middle">
          <tspan x="328.5" y="265.48">
            Parse and clean
          </tspan>
        </text>
      </g>
      <g id={`${uid}-n-chunker`}>
        <use href={`#${uid}-s3`} x="428.5" y="164.9" width="64" height="64" />
        <text fontSize="13" fill="#000000" textAnchor="middle">
          <tspan x="460.51" y="248.08">
            Chunking
          </tspan>
        </text>
        <text fontSize="11.5" fill="#5f6b7a" textAnchor="middle">
          <tspan x="460.51" y="265.48">
            512-token chunks
          </tspan>
        </text>
      </g>
      <g id={`${uid}-n-embedder`}>
        <use href={`#${uid}-s4`} x="567" y="164.9" width="64" height="64" />
        <text fontSize="13" fill="#000000" textAnchor="middle">
          <tspan x="599" y="248.08">
            Embedding
          </tspan>
        </text>
        <text fontSize="11.5" fill="#5f6b7a" textAnchor="middle">
          <tspan x="599" y="265.48">
            Embed and upsert
          </tspan>
        </text>
      </g>
      <g id={`${uid}-n-bge`}>
        <use href={`#${uid}-s5`} x="560" y="362.9" width="64" height="64" />
        <text fontSize="13" fill="#000000" textAnchor="middle">
          <tspan x="592.01" y="446.08">
            bge-m3
          </tspan>
        </text>
        <text fontSize="11.5" fill="#5f6b7a" textAnchor="middle">
          <tspan x="592.01" y="463.48">
            Embeds chunks and
          </tspan>
          <tspan x="592.01" y="478.48">
            queries
          </tspan>
        </text>
      </g>
      <g id={`${uid}-n-qdrant`}>
        <use href={`#${uid}-s6`} x="700" y="370.4" width="64" height="64" />
        <text fontSize="13" fill="#000000" textAnchor="middle">
          <tspan x="732.01" y="453.58">
            Qdrant
          </tspan>
        </text>
        <text fontSize="11.5" fill="#5f6b7a" textAnchor="middle">
          <tspan x="732" y="470.98">
            Vector database
          </tspan>
        </text>
      </g>
      <g id={`${uid}-n-user`}>
        <use href={`#${uid}-s7`} x="48" y="607.9" width="64" height="64" />
        <text fontSize="13" fill="#000000" textAnchor="middle">
          <tspan x="80.01" y="691.08">
            User
          </tspan>
        </text>
      </g>
      <g id={`${uid}-n-react`}>
        <use href={`#${uid}-s8`} x="218" y="607.9" width="64" height="64" />
        <text fontSize="13" fill="#000000" textAnchor="middle">
          <tspan x="250" y="691.08">
            React
          </tspan>
        </text>
        <text fontSize="11.5" fill="#5f6b7a" textAnchor="middle">
          <tspan x="250" y="708.48">
            Chat UI
          </tspan>
        </text>
      </g>
      <g id={`${uid}-n-fastapi`}>
        <use href={`#${uid}-s9`} x="388" y="607.9" width="64" height="64" />
        <text fontSize="13" fill="#000000" textAnchor="middle">
          <tspan x="420" y="691.08">
            FastAPI
          </tspan>
        </text>
        <text fontSize="11.5" fill="#5f6b7a" textAnchor="middle">
          <tspan x="420" y="708.48">
            Chat server
          </tspan>
        </text>
      </g>
      <g id={`${uid}-n-langchain`}>
        <use href={`#${uid}-s10`} x="566.5" y="607.9" width="64" height="64" />
        <text fontSize="13" fill="#000000" textAnchor="middle">
          <tspan x="598.5" y="691.08">
            LangChain
          </tspan>
        </text>
        <text fontSize="11.5" fill="#5f6b7a" textAnchor="middle">
          <tspan x="598.5" y="708.48">
            Retrieval chain
          </tspan>
        </text>
      </g>
      <g id={`${uid}-n-redis`}>
        <use href={`#${uid}-s11`} x="388" y="805.9" width="64" height="64" />
        <text fontSize="13" fill="#000000" textAnchor="middle">
          <tspan x="420" y="889.08">
            Redis
          </tspan>
        </text>
        <text fontSize="11.5" fill="#5f6b7a" textAnchor="middle">
          <tspan x="420" y="906.48">
            Answer cache
          </tspan>
        </text>
      </g>
      <g id={`${uid}-n-ollama`}>
        <use href={`#${uid}-s12`} x="499" y="805.9" width="64" height="64" />
        <text fontSize="13" fill="#000000" textAnchor="middle">
          <tspan x="531" y="889.08">
            Ollama
          </tspan>
        </text>
        <text fontSize="11.5" fill="#5f6b7a" textAnchor="middle">
          <tspan x="531" y="906.48">
            Local LLM
          </tspan>
        </text>
      </g>
      <g id={`${uid}-n-hosted`}>
        <use href={`#${uid}-s13`} x="626.5" y="805.9" width="64" height="64" />
        <text fontSize="13" fill="#000000" textAnchor="middle">
          <tspan x="658.5" y="889.08">
            Hosted model API
          </tspan>
        </text>
        <text fontSize="11.5" fill="#5f6b7a" textAnchor="middle">
          <tspan x="658.5" y="906.48">
            OpenAI-compatible
          </tspan>
        </text>
      </g>
      <g id={`${uid}-n-langfuse`}>
        <use href={`#${uid}-s14`} x="768.5" y="805.9" width="64" height="64" />
        <text fontSize="13" fill="#000000" textAnchor="middle">
          <tspan x="800.5" y="889.08">
            Langfuse
          </tspan>
        </text>
        <text fontSize="11.5" fill="#5f6b7a" textAnchor="middle">
          <tspan x="800.5" y="906.48">
            Traces and evals
          </tspan>
        </text>
      </g>
      <g id={`${uid}-legend`}>
        <rect x="695" y="922" width="152" height="71" rx="6" fill="#ffffff" stroke="#c6ccd4" strokeWidth="1" />
        <path d="M705 939.5 H733" fill="none" stroke="#545b64" strokeWidth="1.5" />
        <text fontSize="11.5" fill="#000000">
          <tspan x="741" y="943.68">
            Data flow
          </tspan>
        </text>
        <path d="M705 957.5 H733" fill="none" stroke="#545b64" strokeWidth="1.5" strokeDasharray="6 4" />
        <text fontSize="11.5" fill="#000000">
          <tspan x="741" y="961.68">
            Alternative model
          </tspan>
        </text>
        <path d="M705 975.5 H733" fill="none" stroke="#545b64" strokeWidth="1.5" strokeDasharray="1.5 3.5" strokeLinecap="round" />
        <text fontSize="11.5" fill="#000000">
          <tspan x="741" y="979.68">
            Tracing
          </tspan>
        </text>
      </g>
    </svg>
  );
}
