{
  "id": "task_libraries:rag/python",
  "path": "/exapedia/python-rag-libraries",
  "template": {
    "id": "task_libraries",
    "version": 4
  },
  "title": "Python RAG libraries",
  "answer": [
    {
      "t": "text",
      "text": "Python RAG libraries connect a language model to a set of documents through retrieval-augmented generation (RAG): code finds the passages relevant to a question and passes them to the model as context. These libraries let AI agents and chat assistants answer from a company's own documents rather than only from what the model learned in training."
    }
  ],
  "breadcrumb": [
    {
      "label": "Tools"
    },
    {
      "label": "Python RAG libraries"
    }
  ],
  "sections": [
    {
      "id": "libraries_popularity",
      "anchor": "popularity",
      "heading": "Popularity",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Monthly downloads",
            "Stars",
            "Last release",
            "License"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#botothree",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F130"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F131"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F139"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F134"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F132"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#openai",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F148"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F149"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F157"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F152"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F150"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#google-genai",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F166"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F167"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F175"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F170"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F168"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#langchain-classic",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F185"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F186"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F194"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F189"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F187"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#google-adk",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F204"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F205"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F213"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F208"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F206"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#azure-ai-projects",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F222"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F223"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F231"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F226"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F224"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#dspy",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F240"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F241"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F249"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F244"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F242"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#llamaindex-core",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F259"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F260"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F266"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F263"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F261"
                }
              ]
            ]
          ],
          "variant": "pop",
          "caption": [
            {
              "t": "text",
              "text": "Downloads: "
            },
            {
              "t": "text",
              "text": "PyPI"
            },
            {
              "t": "text",
              "text": ", last thirty days. Stars and releases: GitHub. Amber: no release in over a year."
            }
          ]
        }
      ],
      "note": [
        {
          "t": "link",
          "href": "#botothree",
          "label": [
            {
              "t": "fact",
              "fact": "F130"
            }
          ]
        },
        {
          "t": "text",
          "text": " has the most monthly downloads in this comparison, at "
        },
        {
          "t": "fact",
          "fact": "F131"
        },
        {
          "t": "text",
          "text": ", a count that covers the whole AWS SDK rather than its knowledge base client alone."
        }
      ]
    },
    {
      "id": "libraries_capabilities",
      "anchor": "capabilities",
      "heading": "Capabilities",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "File/corpus loading API",
            "In-process corpus index"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#botothree",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F130"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F140"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F141"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#openai",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F148"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F158"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F159"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#google-genai",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F166"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F176"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F177"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#langchain-classic",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F185"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F195"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F196"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#google-adk",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F204"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F214"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F215"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#azure-ai-projects",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F222"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F232"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F233"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#dspy",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F240"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F250"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F251"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#llamaindex-core",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F259"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F267"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F268"
                }
              ]
            ]
          ],
          "variant": "cap"
        }
      ]
    },
    {
      "id": "libraries_entries",
      "anchor": "libraries",
      "heading": "Libraries",
      "blocks": [
        {
          "b": "entry",
          "anchor": "botothree",
          "name": [
            {
              "t": "fact",
              "fact": "F130"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/boto/boto3"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/boto3"
            },
            {
              "label": "Docs",
              "href": "https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/bedrock-agent-runtime.html"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "The AWS SDK for Python reaches Amazon Bedrock Knowledge Bases, a managed service that stores documents, splits them into chunks, and embeds them for retrieval. The knowledge base and its data source are set up in AWS first. From Python, the "
            },
            {
              "t": "code",
              "text": "bedrock-agent-runtime"
            },
            {
              "t": "text",
              "text": " client's "
            },
            {
              "t": "code",
              "text": "retrieve"
            },
            {
              "t": "text",
              "text": " method returns the matching chunks, and "
            },
            {
              "t": "code",
              "text": "retrieve_and_generate"
            },
            {
              "t": "text",
              "text": " also passes them to a chosen foundation model, which answers with citations to the source data. Bedrock can also rerank the chunks with a separate reranking model."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F131"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F139"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F133"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F132"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/bedrock-agent-runtime.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F130"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F290"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F291"
                }
              ]
            }
          ],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F146"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F147"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/langchain-ai/langchain-aws",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F146"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def _get_relevant_documents(\n    self,\n    query: str,\n    *,\n    run_manager: CallbackManagerForRetrieverRun,\n) -> List[Document]:\n    \"\"\"Get relevant document from a KnowledgeBase\n\n    Parameters:\n        query: The user's query.\n        run_manager: The callback handler to use.\n\n    Returns:\n        A list of relevant documents.\n\n    \"\"\"\n    retrieve_request: Dict[str, Any] = self._get_retrieve_request(query)\n    response = self.client.retrieve(**retrieve_request)\n    results = response[\"retrievalResults\"]\n    documents: List[Document] = (\n        AmazonKnowledgeBasesRetriever._retrieval_results_to_documents(results)\n    )\n\n    return self._filter_by_score_confidence(docs=documents)\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/langchain-ai/langchain-aws/blob/9f6d284bb91e622aab03cc4fa21f2dcf601931ab/libs/aws/langchain_aws/retrievers/bedrock.py#L205-L228",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F145"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=boto3%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F130"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import boto3\n\nclient = boto3.client('bedrock-agent-runtime')\nresponse = client.retrieve_and_generate(\n    input={'text': 'What is the refund policy?'},\n    retrieveAndGenerateConfiguration={\n        'type': 'KNOWLEDGE_BASE',\n        'knowledgeBaseConfiguration': {\n            'knowledgeBaseId': 'YOUR_KNOWLEDGE_BASE_ID',\n            'modelArn': 'YOUR_SUPPORTED_MODEL_ARN',\n        },\n    },\n)\nprint(response['output']['text'])\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/bedrock-agent-runtime.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "retrieve_and_generate.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F135"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "openai",
          "name": [
            {
              "t": "fact",
              "fact": "F148"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/openai/openai-python"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/openai"
            },
            {
              "label": "Docs",
              "href": "https://platform.openai.com/docs/guides/tools-file-search"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "The OpenAI Python library reaches File Search, a hosted tool in the Responses API. Files are uploaded through the Files API and added to a vector store, where OpenAI chunks and indexes them for semantic and keyword search. A Responses API call lists "
            },
            {
              "t": "code",
              "text": "file_search"
            },
            {
              "t": "text",
              "text": " with the vector store ID among its tools, and the model decides when to search and cites the files it used. The retrieval code runs on OpenAI's side."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F149"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F157"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F151"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F150"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://platform.openai.com/docs/guides/tools-file-search",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F148"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F292"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F293"
                }
              ]
            }
          ],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F164"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F165"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/openai/openai-cookbook",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F164"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "@mcp.tool()\nasync def fetch(id: str) -> Dict[str, Any]:\n    \"\"\"\n    Retrieve complete document content by ID for detailed analysis and citation.\n\n    This tool fetches the full document content from OpenAI Vector Store or local storage.\n    Use this after finding relevant documents with the search tool to get complete \n    information for analysis and proper citation.\n\n    Args:\n        id: File ID from vector store (file-xxx) or local document ID\n\n    Returns:\n        Complete document with id, title, full text content, optional URL, and metadata\n\n    Raises:\n        ValueError: If the specified ID is not found\n    \"\"\"\n    if not id:\n        raise ValueError(\"Document ID is required\")\n\n    if not openai_client:\n        logger.error(\"OpenAI client not initialized - API key missing\")\n        raise ValueError(\n            \"OpenAI API key is required for vector store file retrieval\")\n\n    logger.info(f\"Fetching content from vector store for file ID: {id}\")\n\n    # Fetch file content from vector store\n    content_response = openai_client.vector_stores.files.content(\n        vector_store_id=VECTOR_STORE_ID, file_id=id)\n\n    # Get file metadata\n    file_info = openai_client.vector_stores.files.retrieve(\n        vector_store_id=VECTOR_STORE_ID, file_id=id)\n\n    # Extract content from paginated response\n    file_content = \"\"\n    if hasattr(content_response, 'data') and content_response.data:\n        # Combine all content chunks from FileContentResponse objects\n        content_parts = []\n        for content_item in content_response.data:\n            if hasattr(content_item, 'text'):\n                content_parts.append(content_item.text)\n        file_content = \"\\n\".join(content_parts)\n    else:\n        file_content = \"No content available\"\n\n    # Use filename as title and create proper URL for citations\n    filename = getattr(file_info, 'filename', f\"Document {id}\")\n\n    result = {\n        \"id\": id,\n        \"title\": filename,\n        \"text\": file_content,\n        \"url\": f\"https://platform.openai.com/storage/files/{id}\",\n        \"metadata\": None\n    }\n\n    # Add metadata if available from file info\n    if hasattr(file_info, 'attributes') and file_info.attributes:\n        result[\"metadata\"] = file_info.attributes\n\n    logger.info(f\"Successfully fetched vector store file: {id}\")\n    return result\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/openai/openai-cookbook/blob/dfd760b4de0bd175b51ad05b9b5260c36dfea09c/examples/deep_research_api/how_to_build_a_deep_research_mcp_server/main.py#L109-L173",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F163"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=openai%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F148"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from openai import OpenAI\n\nclient = OpenAI()\n\nresponse = client.responses.create(\n    model=\"gpt-6.2-astra\",\n    input=\"What is deep research by OpenAI?\",\n    tools=[{\"type\": \"file_search\", \"vector_store_ids\": [\"<vector_store_id>\"]}],\n)\nprint(response)\n\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://platform.openai.com/docs/guides/tools-file-search",
                  "label": [
                    {
                      "t": "text",
                      "text": "tools-file-search.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F153"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "google-genai",
          "name": [
            {
              "t": "fact",
              "fact": "F166"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/googleapis/python-genai"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/google-genai"
            },
            {
              "label": "Docs",
              "href": "https://ai.google.dev/gemini-api/docs/file-search"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "The Google Gen AI SDK reaches Gemini File Search, a tool in the Gemini API. A File Search store is created with "
            },
            {
              "t": "code",
              "text": "file_search_stores.create"
            },
            {
              "t": "text",
              "text": ", and "
            },
            {
              "t": "code",
              "text": "upload_to_file_search_store"
            },
            {
              "t": "text",
              "text": " imports a file that the API chunks, embeds, and indexes. A model call that lists the store in its "
            },
            {
              "t": "code",
              "text": "file_search"
            },
            {
              "t": "text",
              "text": " tool retrieves passages and answers from them, with citations attached to the response. Google bills for indexing embeddings and model tokens, and storage and query-time embeddings are free."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F167"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F175"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F169"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F168"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://ai.google.dev/gemini-api/docs/file-search",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F166"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F294"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F295"
                }
              ]
            }
          ],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F183"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F184"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/google/adk-python",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F183"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "@override\nasync def process_llm_request(\n    self,\n    *,\n    tool_context: ToolContext,\n    llm_request: LlmRequest,\n) -> None:\n  # Use Gemini built-in Vertex AI RAG tool for Gemini models.\n  model_check_disabled = is_gemini_model_id_check_disabled()\n  if is_gemini_model(llm_request.model) or model_check_disabled:\n    llm_request.config = (\n        types.GenerateContentConfig()\n        if not llm_request.config\n        else llm_request.config\n    )\n    llm_request.config.tools = (\n        [] if not llm_request.config.tools else llm_request.config.tools\n    )\n    llm_request.config.tools.append(\n        types.Tool(\n            retrieval=types.Retrieval(vertex_rag_store=self.vertex_rag_store)\n        )\n    )\n  else:\n    # Add the function declaration to the tools\n    await super().process_llm_request(\n        tool_context=tool_context, llm_request=llm_request\n    )\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/google/adk-python/blob/e2a21ac23260d043bf9d217b573af1bef48f0f70/src/google/adk/tools/retrieval/vertex_ai_rag_retrieval.py#L144-L171",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F182"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=google-genai%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F166"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from google import genai\n\nclient = genai.Client()\ninteraction = client.interactions.create(\n    model='YOUR_SUPPORTED_GEMINI_MODEL',\n    input='What is the refund policy?',\n    tools=[{'type': 'file_search', 'file_search_store_names': ['YOUR_FILE_SEARCH_STORE_NAME']}],\n)\nprint(interaction)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://ai.google.dev/gemini-api/docs/file-search",
                  "label": [
                    {
                      "t": "text",
                      "text": "file-search/"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F171"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "langchain-classic",
          "name": [
            {
              "t": "fact",
              "fact": "F185"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/langchain-ai/langchain"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/langchain-classic"
            },
            {
              "label": "Docs",
              "href": "https://reference.langchain.com/python/langchain_classic/chains/retrieval/create_retrieval_chain/"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "LangChain Classic contains the chain-based APIs from earlier LangChain releases, including retrieval chains. "
            },
            {
              "t": "code",
              "text": "create_retrieval_chain"
            },
            {
              "t": "text",
              "text": " joins a retriever, such as a vector store wrapped with "
            },
            {
              "t": "code",
              "text": "as_retriever"
            },
            {
              "t": "text",
              "text": ", with a document-combining chain such as "
            },
            {
              "t": "code",
              "text": "create_stuff_documents_chain"
            },
            {
              "t": "text",
              "text": ", which places the retrieved documents in the prompt. Calling "
            },
            {
              "t": "code",
              "text": "invoke"
            },
            {
              "t": "text",
              "text": " with an input returns the answer along with the documents it used. Current LangChain guides build RAG as an agent with a retrieval tool, and the classic package keeps existing chains running."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F186"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F194"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F188"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F187"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://reference.langchain.com/python/langchain_classic/chains/retrieval/create_retrieval_chain/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F185"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F296"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F297"
                }
              ]
            }
          ],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F202"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F203"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/AISecurityLab/hackagent",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F202"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "@app.post(\"/v1/chat/completions\", response_model=ChatCompletionResponse)\nasync def chat_completions(request: ChatCompletionRequest):\n    try:\n        # Retrieve last message\n        last_user_message = request.messages[-1].content\n        print(f\"[RAG] Received query: {last_user_message}\")\n\n        # Execute RAG\n        if \"rag_chain\" not in globals():\n            raise HTTPException(\n                status_code=500, detail=\"The RAG system was not correctly initialized.\"\n            )\n\n        response = rag_chain.invoke({\"input\": last_user_message})\n        answer_text = response[\"answer\"]\n\n        # Answer\n        return ChatCompletionResponse(\n            id=f\"chatcmpl-{uuid.uuid4()}\",\n            created=int(time.time()),\n            model=\"google/gemma-3n-e4b-it\",  # we return the RAG LLM name for compatibility, but it's not actually used by the client since we run a custom RAG chain\n            choices=[\n                ChatCompletionResponseChoice(\n                    index=0,\n                    message=Message(role=\"assistant\", content=answer_text),\n                    finish_reason=\"stop\",\n                )\n            ],\n            usage={\"prompt_tokens\": 0, \"completion_tokens\": 0, \"total_tokens\": 0},\n        )\n\n    except Exception as e:\n        print(f\"SERVER ERRROR: {str(e)}\")\n        raise HTTPException(status_code=500, detail=str(e))\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/AISecurityLab/hackagent/blob/c51b05db84bad1fd0eaeff3a14e3a04c9e0190d3/hackagent/examples/langchain/rag/agent_server.py#L121-L154",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F201"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=langchain-classic%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F185"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from langchain_core.documents import Document\nfrom langchain_core.vectorstores import InMemoryVectorStore\nfrom langchain_core.prompts import ChatPromptTemplate\nfrom langchain_openai import ChatOpenAI, OpenAIEmbeddings\nfrom langchain_classic.chains import create_retrieval_chain\nfrom langchain_classic.chains.combine_documents import create_stuff_documents_chain\n\nstore = InMemoryVectorStore(OpenAIEmbeddings())\nstore.add_documents([Document(page_content='Refunds are available for 30 days.')])\nprompt = ChatPromptTemplate.from_messages([('system', 'Answer from this context: {context}'), ('human', '{input}')])\ncombine = create_stuff_documents_chain(ChatOpenAI(), prompt)\nchain = create_retrieval_chain(store.as_retriever(), combine)\nprint(chain.invoke({'input': 'When can I get a refund?'})['answer'])\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://reference.langchain.com/python/langchain_classic/chains/retrieval/create_retrieval_chain/",
                  "label": [
                    {
                      "t": "text",
                      "text": "retrieval.py"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F190"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "google-adk",
          "name": [
            {
              "t": "fact",
              "fact": "F204"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/google/adk-python"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/google-adk"
            },
            {
              "label": "Docs",
              "href": "https://google.github.io/adk-docs/"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "Google ADK, the Agent Development Kit, connects agents to retrieval through tools. The "
            },
            {
              "t": "code",
              "text": "VertexAiRagRetrieval"
            },
            {
              "t": "text",
              "text": " tool queries a corpus in Vertex AI RAG Engine, a hosted Google Cloud service that stores and indexes documents. On Gemini models the tool attaches as native retrieval, and on other models ADK calls the corpus and passes the retrieved contexts back to the agent. The corpus is created and filled in Vertex AI before the agent can use it."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F205"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F213"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F207"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F206"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://google.github.io/adk-docs/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F204"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F298"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F299"
                }
              ]
            }
          ],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F220"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F221"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/google/adk-recipes",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F220"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def create_search_tool(\n    data_store_path: str,\n) -> VertexAiSearchTool | Callable[[str], str]:\n    \"\"\"Create a Agent Platform Search tool or mock for testing.\n\n    Args:\n        data_store_path: Full resource path of the datastore.\n\n    Returns:\n        VertexAiSearchTool instance or mock function for testing.\n    \"\"\"\n    # For integration tests, return a mock function instead of the real tool\n    if os.getenv(\"INTEGRATION_TEST\") == \"TRUE\":\n\n        def mock_search(query: str) -> str:\n            \"\"\"Mock Agent Platform Search for integration tests.\"\"\"\n            return \"Mock search result for testing purposes.\"\n\n        return mock_search\n\n    return VertexAiSearchTool(data_store_id=data_store_path)\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/google/adk-recipes/blob/ead8d7f74d5b1def48a5a7451aed8106aae8d2e6/core/python/rag-agent-search/app/retrievers.py#L21-L41",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F219"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=google-adk%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F204"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import asyncio\nimport os\nfrom google.adk.agents import Agent\nfrom google.adk.runners import InMemoryRunner\nfrom google.adk.tools.retrieval.vertex_ai_rag_retrieval import VertexAiRagRetrieval\n\nasync def main():\n    retrieval = VertexAiRagRetrieval(name='retrieve_docs', description='Retrieve document context.', rag_resources=[{'rag_corpus': os.environ['RAG_CORPUS']}])\n    agent = Agent(name='assistant', model=os.environ['GEMINI_MODEL'], instruction='Answer from retrieved documents.', tools=[retrieval])\n    runner = InMemoryRunner(agent=agent)\n    await runner.run_debug('What is the refund policy?')\n\nasyncio.run(main())\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://pypi.org/pypi/google-adk/2.14.1/json",
                  "label": [
                    {
                      "t": "text",
                      "text": "vertex_ai_rag_retrieval.py"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F209"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "azure-ai-projects",
          "name": [
            {
              "t": "fact",
              "fact": "F222"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/Azure/azure-sdk-for-python"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/azure-ai-projects"
            },
            {
              "label": "Docs",
              "href": "https://learn.microsoft.com/en-us/azure/ai-foundry/agents/how-to/tools/file-search"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "The Azure AI Projects library manages agents in Microsoft Foundry, including the file search tool. Files are uploaded to a vector store, and an agent created with "
            },
            {
              "t": "code",
              "text": "FileSearchTool"
            },
            {
              "t": "text",
              "text": " retrieves passages from them when answering. With the standard agent setup, the files stay in the project's own Azure storage and Azure AI Search indexes them. Microsoft charges for file search on top of the model's token fees."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F223"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F231"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F225"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F224"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://learn.microsoft.com/en-us/azure/ai-foundry/agents/how-to/tools/file-search",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F222"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F300"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F301"
                }
              ]
            }
          ],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F238"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F239"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/MicrosoftLearning/mslearn-ai-agents",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F238"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def main():\n    parser = argparse.ArgumentParser(\n        description=\"Create and ground the caldova-knowledge-agent.\"\n    )\n    parser.add_argument(\n        \"--force\",\n        action=\"store_true\",\n        help=\"Create a new version even if the agent already exists.\",\n    )\n    args = parser.parse_args()\n\n    load_dotenv(ENV_PATH)\n    project_endpoint = os.getenv(\"PROJECT_ENDPOINT\")\n    model_deployment = os.getenv(\"MODEL_DEPLOYMENT_NAME\")\n\n    if not project_endpoint:\n        fail(\"PROJECT_ENDPOINT is not set in Python/.env. Run 'azd up' or set it from the portal.\")\n    if not model_deployment:\n        fail(\"MODEL_DEPLOYMENT_NAME is not set in Python/.env. Set it to your deployed model name.\")\n\n    data_files = sorted(DATA_DIR.glob(\"*.md\"))\n    if not data_files:\n        fail(f\"No knowledge documents found in {DATA_DIR}.\")\n\n    print(\"Connecting to your Foundry project ...\")\n    with (\n        DefaultAzureCredential() as credential,\n        AIProjectClient(endpoint=project_endpoint, credential=credential) as project_client,\n        project_client.get_openai_client() as openai_client,\n    ):\n        if agent_exists(project_client) and not args.force:\n            print(f\"\\nAgent '{AGENT_NAME}' already exists - nothing to do.\")\n            print(\"Re-run with --force to add a new grounded version.\")\n            set_env_value(\"AGENT_NAME\", AGENT_NAME)\n            print(f\"Ensured AGENT_NAME={AGENT_NAME} in {ENV_PATH}\")\n            return\n\n        print(f\"Grounding the agent (this uploads {len(data_files)} knowledge documents):\")\n        file_ids = [upload_file(openai_client, path) for path in data_files]\n        vector_store_id = build_vector_store(openai_client, file_ids)\n\n        file_search = FileSearchTool(vector_store_ids=[vector_store_id])\n\n        print(\"Creating the agent ...\")\n        agent = project_client.agents.create_version(\n            agent_name=AGENT_NAME,\n            definition=PromptAgentDefinition(\n                model=model_deployment,\n                instructions=INSTRUCTIONS,\n                tools=[file_search],\n            ),\n        )\n        print(f\"  Created '{agent.name}' (version {agent.version}).\")\n\n    set_env_value(\"AGENT_NAME\", AGENT_NAME)\n    print(f\"\\nWrote AGENT_NAME={AGENT_NAME} to {ENV_PATH}\")\n    print(\"You're ready to connect from code: run 'python knowledge_agent.py' from the Python folder.\")\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/MicrosoftLearning/mslearn-ai-agents/blob/df5b56b41480298afc09abf28c79c0d1856f40dd/Labfiles/B-integrate-agents-with-enterprise-knowledge-and-m365/setup/bootstrap_agent.py#L124-L180",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F237"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=azure-ai-projects%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F222"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import os\nfrom azure.identity import DefaultAzureCredential\nfrom azure.ai.projects import AIProjectClient\nfrom azure.ai.projects.models import FileSearchTool, PromptAgentDefinition\n\nwith AIProjectClient(endpoint=os.environ['FOUNDRY_PROJECT_ENDPOINT'], credential=DefaultAzureCredential()) as project:\n    agent = project.agents.create_version(\n        agent_name='document-assistant',\n        definition=PromptAgentDefinition(\n            model=os.environ['FOUNDRY_MODEL_NAME'],\n            tools=[FileSearchTool(vector_store_ids=[os.environ['VECTOR_STORE_ID']])],\n        ),\n    )\n    print(agent.name)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://learn.microsoft.com/en-us/azure/ai-foundry/agents/how-to/tools/file-search",
                  "label": [
                    {
                      "t": "text",
                      "text": "sample_agent_file_search.py"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F227"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "dspy",
          "name": [
            {
              "t": "fact",
              "fact": "F240"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/stanfordnlp/dspy"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/dspy"
            },
            {
              "label": "Docs",
              "href": "https://dspy.ai/tutorials/rag/"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "DSPy treats RAG as a program built from modules. A retriever such as "
            },
            {
              "t": "code",
              "text": "dspy.retrievers.Embeddings"
            },
            {
              "t": "text",
              "text": " searches an in-memory corpus using any configured embedder, and a module such as "
            },
            {
              "t": "code",
              "text": "dspy.ChainOfThought"
            },
            {
              "t": "text",
              "text": " answers from the retrieved context through a signature like context and question in, answer out. The pieces live in a "
            },
            {
              "t": "code",
              "text": "dspy.Module"
            },
            {
              "t": "text",
              "text": " subclass. Optimizers then tune the prompts of the full program using example questions and a scoring function."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F241"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F249"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F243"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F242"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://dspy.ai/tutorials/rag/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F240"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F302"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F303"
                }
              ]
            }
          ],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F257"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F258"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/SylphAI-Inc/AdalFlow",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F257"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def forward(self, question):\n\n    passages = self.retrieve(question).passages\n\n    pred = self.generate_answer(context=passages, question=question)\n    return dspy.Prediction(context=passages, answer=pred.answer)\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/SylphAI-Inc/AdalFlow/blob/12f3fa686bdaf01099db65d4c5b1c685513f7a65/benchmarks/hotpot_qa/dspy_vanilla_rag.py#L55-L60",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F256"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=dspy%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F240"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import dspy\n\ndspy.configure(lm=dspy.LM('YOUR_CONFIGURED_LM'))\nsearch = dspy.retrievers.Embeddings(\n    embedder=dspy.Embedder('openai/text-embedding-3-small', dimensions=512),\n    corpus=['Refunds are available for 30 days.'], k=1, brute_force_threshold=30000,\n)\nanswer = dspy.ChainOfThought('context, question -> response')\nquestion = 'When can I get a refund?'\ncontext = search(question).passages\nprint(answer(context=context, question=question).response)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/stanfordnlp/dspy/blob/main/docs/docs/tutorials/rag/index.ipynb#decoded-notebook-cells",
                  "label": [
                    {
                      "t": "text",
                      "text": "index.ipynb"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F245"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "llamaindex-core",
          "name": [
            {
              "t": "fact",
              "fact": "F259"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/run-llama/llama_index"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/llama-index-core"
            },
            {
              "label": "Docs",
              "href": "https://developers.llamaindex.ai/python/framework/"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "LlamaIndex Core loads documents, indexes them, and answers questions from the retrieved passages. "
            },
            {
              "t": "code",
              "text": "SimpleDirectoryReader"
            },
            {
              "t": "text",
              "text": " reads a folder of files, and "
            },
            {
              "t": "code",
              "text": "VectorStoreIndex.from_documents"
            },
            {
              "t": "text",
              "text": " splits them into chunks and embeds them. "
            },
            {
              "t": "code",
              "text": "as_query_engine"
            },
            {
              "t": "text",
              "text": " returns an engine that retrieves the closest chunks and writes an answer, and "
            },
            {
              "t": "code",
              "text": "response.source_nodes"
            },
            {
              "t": "text",
              "text": " lists the chunks behind it. Metadata filters narrow retrieval to matching documents, and the embedding model and vector store come from separate integration packages."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F260"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F266"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F262"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F261"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://developers.llamaindex.ai/python/framework/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F259"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F13"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F14"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F15"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F16"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F17"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F18"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F19"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F20"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F274"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F275"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/open-webui/pipelines",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F274"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def pipe(\n    self, user_message: str, model_id: str, messages: List[dict], body: dict\n) -> Union[str, Generator, Iterator]:\n    # This is where you can add your custom RAG pipeline.\n    # Typically, you would retrieve relevant information from your knowledge base and synthesize it to generate a response.\n\n    print(messages)\n    print(user_message)\n\n    query_engine = self.index.as_query_engine(streaming=True)\n    response = query_engine.query(user_message)\n\n    return response.response_gen",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/open-webui/pipelines/blob/c7121bd904c15954b458eb2184ba77c379936284/examples/pipelines/rag/llamaindex_ollama_pipeline.py#L62-L74",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F273"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20applications%20using%20llama-index-core%20to%20index%20documents%2C%20retrieve%20context%2C%20inspect%20sources%20and%20generate%20grounded%20answers&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F259"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import os\n\nos.environ[\"OPENAI_API_KEY\"] = \"YOUR_OPENAI_API_KEY\"\n\nfrom llama_index.core import VectorStoreIndex, SimpleDirectoryReader\n\ndocuments = SimpleDirectoryReader(\"YOUR_DATA_DIRECTORY\").load_data()\nindex = VectorStoreIndex.from_documents(documents)\n\nquery_engine = index.as_query_engine()\nquery_engine.query(\"YOUR_QUESTION\")\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/run-llama/llama_index/blob/main/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F264"
            }
          ]
        }
      ]
    }
  ],
  "questions": [
    {
      "q": "Which Python library should I use for RAG?",
      "a": [
        {
          "t": "text",
          "text": "An application already on one provider can use that provider's hosted search: Bedrock Knowledge Bases through "
        },
        {
          "t": "link",
          "href": "#botothree",
          "label": [
            {
              "t": "fact",
              "fact": "F130"
            }
          ]
        },
        {
          "t": "text",
          "text": ", "
        },
        {
          "t": "link",
          "href": "#openai",
          "label": [
            {
              "t": "text",
              "text": "OpenAI File Search"
            }
          ]
        },
        {
          "t": "text",
          "text": ", "
        },
        {
          "t": "link",
          "href": "#google-genai",
          "label": [
            {
              "t": "text",
              "text": "Gemini File Search"
            }
          ]
        },
        {
          "t": "text",
          "text": ", or "
        },
        {
          "t": "link",
          "href": "#azure-ai-projects",
          "label": [
            {
              "t": "text",
              "text": "Foundry File Search"
            }
          ]
        },
        {
          "t": "text",
          "text": ". "
        },
        {
          "t": "link",
          "href": "#llamaindex-core",
          "label": [
            {
              "t": "text",
              "text": "LlamaIndex"
            }
          ]
        },
        {
          "t": "text",
          "text": ", "
        },
        {
          "t": "link",
          "href": "#langchain-classic",
          "label": [
            {
              "t": "text",
              "text": "LangChain Classic"
            }
          ]
        },
        {
          "t": "text",
          "text": ", and "
        },
        {
          "t": "link",
          "href": "#dspy",
          "label": [
            {
              "t": "text",
              "text": "DSPy"
            }
          ]
        },
        {
          "t": "text",
          "text": " build the pipeline in the application's own code, with any embedding model and vector store."
        }
      ]
    },
    {
      "q": "How do I build RAG with LangChain?",
      "a": [
        {
          "t": "text",
          "text": "In the classic package, "
        },
        {
          "t": "code",
          "text": "create_retrieval_chain"
        },
        {
          "t": "text",
          "text": " joins a retriever with a chain that passes the retrieved documents to the model. Current LangChain guides build RAG as an agent that calls a retrieval tool."
        }
      ]
    },
    {
      "q": "How do I build RAG with LlamaIndex?",
      "a": [
        {
          "t": "code",
          "text": "VectorStoreIndex.from_documents"
        },
        {
          "t": "text",
          "text": " chunks and embeds the documents, "
        },
        {
          "t": "code",
          "text": "as_query_engine"
        },
        {
          "t": "text",
          "text": " returns an engine that retrieves and answers, and "
        },
        {
          "t": "code",
          "text": "response.source_nodes"
        },
        {
          "t": "text",
          "text": " lists the passages behind each answer."
        }
      ]
    },
    {
      "q": "What is Gemini File Search?",
      "a": [
        {
          "t": "text",
          "text": "Gemini File Search is a tool in the Gemini API that imports, chunks, and indexes uploaded files in a File Search store. A model call that names the store retrieves passages from it and uses them as context."
        }
      ]
    },
    {
      "q": "What is OpenAI File Search?",
      "a": [
        {
          "t": "text",
          "text": "OpenAI File Search is a hosted tool in the Responses API. It searches files uploaded to a vector store with semantic and keyword search, and the model calls it on its own when a question needs the files."
        }
      ]
    },
    {
      "q": "How does DSPy handle RAG?",
      "a": [
        {
          "t": "text",
          "text": "A DSPy RAG program combines a retriever, such as "
        },
        {
          "t": "code",
          "text": "dspy.retrievers.Embeddings"
        },
        {
          "t": "text",
          "text": ", with a module such as "
        },
        {
          "t": "code",
          "text": "dspy.ChainOfThought"
        },
        {
          "t": "text",
          "text": " that answers from the retrieved context. DSPy optimizers can then tune the prompts of the whole program against examples."
        }
      ]
    }
  ],
  "facts": {
    "F1": {
      "label": "Library name, llama-index-core",
      "display": "LlamaIndex Core",
      "asOf": "2026-11-17"
    },
    "F2": {
      "label": "Monthly downloads, llama-index-core",
      "display": "5.6M",
      "asOf": "2026-11-17"
    },
    "F3": {
      "label": "License, llama-index-core",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F4": {
      "label": "Package release, llama-index-core",
      "display": "0.14.26, Nov 2026",
      "asOf": "2026-11-13"
    },
    "F5": {
      "label": "Package release date, llama-index-core",
      "display": "Nov 2026",
      "asOf": "2026-11-13"
    },
    "F6": {
      "label": "Repository stars, llama-index-core",
      "display": "52.9K",
      "asOf": "2026-11-17"
    },
    "F7": {
      "label": "Reranks results, llama-index-core",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F8": {
      "label": "Metadata filters, llama-index-core",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F9": {
      "label": "Source passages, llama-index-core",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F10": {
      "label": "Async query API, llama-index-core",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F11": {
      "label": "Install, llama-index-core",
      "display": "pip install llama-index",
      "asOf": "2026-11-17"
    },
    "F12": {
      "label": "What it does, llama-index-core",
      "display": "Indexes documents and combines retrieval, context processing and answer generation.",
      "asOf": "2026-11-17"
    },
    "F13": {
      "label": "strengths lead, llama-index-core",
      "display": "Exposes retrieved source text",
      "asOf": "2026-11-17"
    },
    "F14": {
      "label": "strengths, llama-index-core",
      "display": "Inspect response.source_nodes or get_formatted_sources after a query.",
      "asOf": "2026-11-17"
    },
    "F15": {
      "label": "strengths lead, llama-index-core",
      "display": "Filters queries by document metadata",
      "asOf": "2026-11-17"
    },
    "F16": {
      "label": "strengths, llama-index-core",
      "display": "Restrict retrieval to properties stored with each document.",
      "asOf": "2026-11-17"
    },
    "F17": {
      "label": "limitations lead, llama-index-core",
      "display": "Old indexes need stored metadata",
      "asOf": "2026-11-17"
    },
    "F18": {
      "label": "limitations, llama-index-core",
      "display": "Rebuild indexes saved without metadata before applying filters.",
      "asOf": "2026-11-17"
    },
    "F19": {
      "label": "limitations lead, llama-index-core",
      "display": "Fine control needs explicit components",
      "asOf": "2026-11-17"
    },
    "F20": {
      "label": "limitations, llama-index-core",
      "display": "Construct a QueryEngine directly when the high-level helper is insufficient.",
      "asOf": "2026-11-17"
    },
    "F21": {
      "label": "Quickstart, llama-index-core",
      "display": "import os\n\nos.environ[\"OPENAI_API_KEY\"] = \"YOUR_OPENAI_API_KEY\"\n\nfrom llama_index.core import VectorStoreIndex, SimpleDirectoryReader\n\ndocuments = SimpleDirectoryReader(\"YOUR_DATA_DIRECTORY\").load_data()\nindex = VectorStoreIndex.from_documents(documents)\n\nquery_engine = index.as_query_engine()\nquery_engine.query(\"YOUR_QUESTION\")\n",
      "asOf": "2026-11-17"
    },
    "F22": {
      "label": "Project function, llama-index-core",
      "display": "async def add_documents(self, documents: List[str]):\n    if not documents:\n        raise ValueError('Document list cannot be empty')\n    from llama_index.core import Document, VectorStoreIndex\n    docs = [Document(text=doc) for doc in documents]\n    self.index = VectorStoreIndex.from_documents(docs)\n    if not self.retrieve_only:\n        await self._setup_query_engine()\n",
      "asOf": "2026-11-17"
    },
    "F23": {
      "label": "Project function reference, llama-index-core",
      "display": "llama_index_rag.py · add_documents()",
      "asOf": "2026-11-17"
    },
    "F24": {
      "label": "Project repository, llama-index-core",
      "display": "modelscope/ms-agent",
      "asOf": "2026-11-17"
    },
    "F25": {
      "label": "Project stars, modelscope/ms-agent",
      "display": "4.4K",
      "asOf": "2026-11-17"
    },
    "F26": {
      "label": "Project push date, modelscope/ms-agent",
      "display": "Nov 2026",
      "asOf": "2026-11-09"
    },
    "F27": {
      "label": "Library name, haystack-ai",
      "display": "Haystack",
      "asOf": "2026-11-17"
    },
    "F28": {
      "label": "Monthly downloads, haystack-ai",
      "display": "634.5K",
      "asOf": "2026-11-17"
    },
    "F29": {
      "label": "License, haystack-ai",
      "display": "Apache-2.0",
      "asOf": "2026-11-17"
    },
    "F30": {
      "label": "Package release, haystack-ai",
      "display": "3.5.0, Nov 2026",
      "asOf": "2026-11-10"
    },
    "F31": {
      "label": "Package release date, haystack-ai",
      "display": "Nov 2026",
      "asOf": "2026-11-10"
    },
    "F32": {
      "label": "Repository stars, haystack-ai",
      "display": "27.0K",
      "asOf": "2026-11-17"
    },
    "F33": {
      "label": "Reranks results, haystack-ai",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F34": {
      "label": "Metadata filters, haystack-ai",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F35": {
      "label": "Source passages, haystack-ai",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F36": {
      "label": "Async query API, haystack-ai",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F37": {
      "label": "Install, haystack-ai",
      "display": "pip install haystack-ai",
      "asOf": "2026-11-17"
    },
    "F38": {
      "label": "What it does, haystack-ai",
      "display": "Connects retrieval, ranking, prompts, and generation in explicit component pipelines.",
      "asOf": "2026-11-17"
    },
    "F39": {
      "label": "strengths lead, haystack-ai",
      "display": "Makes context processing explicit",
      "asOf": "2026-11-17"
    },
    "F40": {
      "label": "strengths, haystack-ai",
      "display": "Control retrieval, ranking, filtering, and routing before calling the model.",
      "asOf": "2026-11-17"
    },
    "F41": {
      "label": "strengths lead, haystack-ai",
      "display": "Runs independent branches concurrently",
      "asOf": "2026-11-17"
    },
    "F42": {
      "label": "strengths, haystack-ai",
      "display": "Use AsyncPipeline when components can process inputs independently.",
      "asOf": "2026-11-17"
    },
    "F43": {
      "label": "limitations lead, haystack-ai",
      "display": "SentenceTransformers reranking needs an integration",
      "asOf": "2026-11-17"
    },
    "F44": {
      "label": "limitations, haystack-ai",
      "display": "Install sentence-transformers-haystack before adding its cross-encoder ranker.",
      "asOf": "2026-11-17"
    },
    "F45": {
      "label": "limitations lead, haystack-ai",
      "display": "Filter operators depend on storage",
      "asOf": "2026-11-17"
    },
    "F46": {
      "label": "limitations, haystack-ai",
      "display": "Check the selected Document Store before relying on an operator.",
      "asOf": "2026-11-17"
    },
    "F47": {
      "label": "Quickstart, haystack-ai",
      "display": "from haystack import Pipeline, Document\nfrom haystack.components.generators.chat import OpenAIChatGenerator\nfrom haystack.components.retrievers import InMemoryBM25Retriever\nfrom haystack.document_stores.in_memory import InMemoryDocumentStore\nfrom haystack.components.builders import ChatPromptBuilder\nfrom haystack.utils import Secret\nfrom haystack.dataclasses import ChatMessage\n\ndocument_store = InMemoryDocumentStore()\ndocument_store.write_documents(\n    [\n        Document(content=\"My name is Jean and I live in Paris.\"),\n        Document(content=\"My name is Mark and I live in Berlin.\"),\n        Document(content=\"My name is Giorgio and I live in Rome.\"),\n    ],\n)\n\nprompt_template = [\n    ChatMessage.from_system(\n        \"\"\"\n        Given these documents, answer the question.\n        Documents:\n        {% for doc in documents %}\n            {{ doc.content }}\n        {% endfor %}\n        \"\"\",\n    ),\n    ChatMessage.from_user(\"{{question}}\"),\n]\n\nretriever = InMemoryBM25Retriever(document_store=document_store)\nprompt_builder = ChatPromptBuilder(template=prompt_template, required_variables=\"*\")\nllm = OpenAIChatGenerator(\n    api_key=Secret.from_env_var(\"OPENAI_API_KEY\"),\n    model=\"gpt-4o-mini\",\n)\n\nrag_pipeline = Pipeline()\nrag_pipeline.add_component(\"retriever\", retriever)\nrag_pipeline.add_component(\"prompt_builder\", prompt_builder)\nrag_pipeline.add_component(\"llm\", llm)\nrag_pipeline.connect(\"retriever\", \"prompt_builder.documents\")\nrag_pipeline.connect(\"prompt_builder\", \"llm\")\n\nquestion = \"Who lives in Paris?\"\nresults = rag_pipeline.run(\n    {\n        \"retriever\": {\"query\": question},\n        \"prompt_builder\": {\"question\": question},\n    },\n)\n\nprint(results[\"llm\"][\"replies\"])\n",
      "asOf": "2026-11-17"
    },
    "F48": {
      "label": "Project function, haystack-ai",
      "display": "def haystack_app():\n\n    # initialize\n    api_key = os.getenv(\"OPENAI_API_KEY\")\n    generator = OpenAIGenerator(\n        api_key=Secret.from_token(api_key), model=\"gpt-3.5-turbo\"\n    )\n\n    # initialize document store, load data and store in document store\n    document_store = InMemoryDocumentStore()\n    dataset = load_dataset(\"bilgeyucel/seven-wonders\", split=\"train\")\n    docs = [Document(content=doc[\"content\"], meta=doc[\"meta\"]) for doc in dataset]\n\n    doc_embedder = SentenceTransformersDocumentEmbedder(\n        model=\"sentence-transformers/all-MiniLM-L6-v2\"\n    )\n    doc_embedder.warm_up()\n    docs_with_embeddings = doc_embedder.run(docs)\n    document_store.write_documents(docs_with_embeddings[\"documents\"])\n\n    # embedder to embed user query\n    text_embedder = SentenceTransformersTextEmbedder(\n        model=\"sentence-transformers/all-MiniLM-L6-v2\"\n    )\n\n    # get relevant documents from embedded query\n    retriever = InMemoryEmbeddingRetriever(document_store)\n\n    # use documents to build the prompt\n    template = \"\"\"\n    Given the following information, answer the question.\n\n    Context:\n    {% for document in documents %}\n        {{ document.content }}\n    {% endfor %}\n\n    Question: {{question}}\n    Answer:\n    \"\"\"\n\n    prompt_builder = PromptBuilder(template=template)\n\n    basic_rag_pipeline = Pipeline()\n    # Add components to your pipeline\n    basic_rag_pipeline.add_component(\"text_embedder\", text_embedder)\n    basic_rag_pipeline.add_component(\"retriever\", retriever)\n    basic_rag_pipeline.add_component(\"prompt_builder\", prompt_builder)\n    basic_rag_pipeline.add_component(\"llm\", generator)\n\n    # Now, connect the components to each other\n    basic_rag_pipeline.connect(\"text_embedder.embedding\", \"retriever.query_embedding\")\n    basic_rag_pipeline.connect(\"retriever\", \"prompt_builder.documents\")\n    basic_rag_pipeline.connect(\"prompt_builder\", \"llm\")\n\n    question = \"What does Rhodes Statue look like?\"\n\n    response = basic_rag_pipeline.run(\n        {\"text_embedder\": {\"text\": question}, \"prompt_builder\": {\"question\": question}}\n    )\n\n    print(response[\"llm\"][\"replies\"][0])\n",
      "asOf": "2026-11-17"
    },
    "F49": {
      "label": "Project function reference, haystack-ai",
      "display": "haystack_app.py · haystack_app()",
      "asOf": "2026-11-17"
    },
    "F50": {
      "label": "Project repository, haystack-ai",
      "display": "traceloop/openllmetry",
      "asOf": "2026-11-17"
    },
    "F51": {
      "label": "Project stars, traceloop/openllmetry",
      "display": "7.5K",
      "asOf": "2026-11-17"
    },
    "F52": {
      "label": "Project push date, traceloop/openllmetry",
      "display": "Nov 2026",
      "asOf": "2026-11-16"
    },
    "F53": {
      "label": "Library name, lightrag-hku",
      "display": "LightRAG",
      "asOf": "2026-11-17"
    },
    "F54": {
      "label": "Monthly downloads, lightrag-hku",
      "display": "151.1K",
      "asOf": "2026-11-17"
    },
    "F55": {
      "label": "License, lightrag-hku",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F56": {
      "label": "Package release, lightrag-hku",
      "display": "1.5.7, Sep 2026",
      "asOf": "2026-09-02"
    },
    "F57": {
      "label": "Package release date, lightrag-hku",
      "display": "Sep 2026",
      "asOf": "2026-09-02"
    },
    "F58": {
      "label": "Repository stars, lightrag-hku",
      "display": "40.7K",
      "asOf": "2026-11-17"
    },
    "F59": {
      "label": "Reranks results, lightrag-hku",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F60": {
      "label": "Source passages, lightrag-hku",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F61": {
      "label": "Async query API, lightrag-hku",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F62": {
      "label": "Install, lightrag-hku",
      "display": "pip install lightrag-hku",
      "asOf": "2026-11-17"
    },
    "F63": {
      "label": "What it does, lightrag-hku",
      "display": "Retrieves knowledge-graph and vector context before generating answers.",
      "asOf": "2026-11-17"
    },
    "F64": {
      "label": "strengths lead, lightrag-hku",
      "display": "Combines graph and vector retrieval",
      "asOf": "2026-11-17"
    },
    "F65": {
      "label": "strengths, lightrag-hku",
      "display": "Use mix mode to query knowledge-graph and vector context.",
      "asOf": "2026-11-17"
    },
    "F66": {
      "label": "strengths lead, lightrag-hku",
      "display": "Separates retrieval from answer generation",
      "asOf": "2026-11-17"
    },
    "F67": {
      "label": "strengths, lightrag-hku",
      "display": "Call aquery_data to inspect retrieved chunks before generating an answer.",
      "asOf": "2026-11-17"
    },
    "F68": {
      "label": "limitations lead, lightrag-hku",
      "display": "Default stores are for testing",
      "asOf": "2026-11-17"
    },
    "F69": {
      "label": "limitations, lightrag-hku",
      "display": "Configure a production storage backend before a production deployment.",
      "asOf": "2026-11-17"
    },
    "F70": {
      "label": "limitations lead, lightrag-hku",
      "display": "Embedding changes require rebuilding vectors",
      "asOf": "2026-11-17"
    },
    "F71": {
      "label": "limitations, lightrag-hku",
      "display": "Re-embed chunks, entities, and relationships after changing the embedding model.",
      "asOf": "2026-11-17"
    },
    "F72": {
      "label": "Quickstart, lightrag-hku",
      "display": "\"\"\"\nLightRAG Demo with Google Gemini Models\n\nThis example demonstrates how to use LightRAG with Google's Gemini Flash model\n(the `gemini-flash-latest` alias) for text generation and the\n`gemini-embedding-001` model for embeddings.\n\nPrerequisites:\n    1. Set GEMINI_API_KEY environment variable:\n       export GEMINI_API_KEY='your-actual-api-key'\n\n    2. Prepare a text file named 'book.txt' in the current directory\n       (or modify BOOK_FILE constant to point to your text file)\n\nUsage:\n    python examples/lightrag_gemini_demo.py\n\"\"\"\n\nimport os\nimport asyncio\nimport nest_asyncio\nimport numpy as np\n\nfrom lightrag import LightRAG, QueryParam\nfrom lightrag.llm.gemini import gemini_model_complete, gemini_embed\nfrom lightrag.utils import wrap_embedding_func_with_attrs\n\nnest_asyncio.apply()\n\nWORKING_DIR = \"./rag_storage\"\nBOOK_FILE = \"./book.txt\"\n\n# Validate API key\nGEMINI_API_KEY = os.environ.get(\"GEMINI_API_KEY\")\nif not GEMINI_API_KEY:\n    raise ValueError(\n        \"GEMINI_API_KEY environment variable is not set. \"\n        \"Please set it with: export GEMINI_API_KEY='your-api-key'\"\n    )\n\nif not os.path.exists(WORKING_DIR):\n    os.mkdir(WORKING_DIR)\n\n\n# --------------------------------------------------\n# LLM function\n# --------------------------------------------------\nasync def llm_model_func(prompt, system_prompt=None, history_messages=[], **kwargs):\n    return await gemini_model_complete(\n        prompt,\n        system_prompt=system_prompt,\n        history_messages=history_messages,\n        api_key=GEMINI_API_KEY,\n        model_name=\"gemini-flash-latest\",\n        **kwargs,\n    )\n\n\n# --------------------------------------------------\n# Embedding function\n# --------------------------------------------------\n@wrap_embedding_func_with_attrs(\n    embedding_dim=768,\n    send_dimensions=True,\n    max_token_size=2048,\n    model_name=\"gemini-embedding-001\",\n)\nasync def embedding_func(\n    texts: list[str], embedding_dim: int | None = None\n) -> np.ndarray:\n    return await gemini_embed.func(\n        texts,\n        api_key=GEMINI_API_KEY,\n        model=\"gemini-embedding-001\",\n        embedding_dim=embedding_dim,\n    )\n\n\n# --------------------------------------------------\n# Initialize RAG\n# --------------------------------------------------\nasync def initialize_rag():\n    rag = LightRAG(\n        working_dir=WORKING_DIR,\n        llm_model_func=llm_model_func,\n        embedding_func=embedding_func,\n        llm_model_name=\"gemini-flash-latest\",\n    )\n\n    # 🔑 REQUIRED\n    await rag.initialize_storages()\n    return rag\n\n\n# --------------------------------------------------\n# Main\n# --------------------------------------------------\ndef main():\n    # Validate book file exists\n    if not os.path.exists(BOOK_FILE):\n        raise FileNotFoundError(\n            f\"'{BOOK_FILE}' not found. \"\n            \"Please provide a text file to index in the current directory.\"\n        )\n\n    rag = asyncio.run(initialize_rag())\n\n    # Insert text\n    with open(BOOK_FILE, \"r\", encoding=\"utf-8\") as f:\n        rag.insert(f.read())\n\n    query = \"What are the top themes?\"\n\n    print(\"\\nNaive Search:\")\n    print(rag.query(query, param=QueryParam(mode=\"naive\")))\n\n    print(\"\\nLocal Search:\")\n    print(rag.query(query, param=QueryParam(mode=\"local\")))\n\n    print(\"\\nGlobal Search:\")\n    print(rag.query(query, param=QueryParam(mode=\"global\")))\n\n    print(\"\\nHybrid Search:\")\n    print(rag.query(query, param=QueryParam(mode=\"hybrid\")))\n\n\nif __name__ == \"__main__\":\n    main()\n",
      "asOf": "2026-11-17"
    },
    "F73": {
      "label": "Library name, txtai",
      "display": "txtai",
      "asOf": "2026-11-17"
    },
    "F74": {
      "label": "Monthly downloads, txtai",
      "display": "14.4K",
      "asOf": "2026-11-17"
    },
    "F75": {
      "label": "License, txtai",
      "display": "Apache-2.0",
      "asOf": "2026-11-17"
    },
    "F76": {
      "label": "Package release, txtai",
      "display": "9.14.0, Oct 2026",
      "asOf": "2026-10-06"
    },
    "F77": {
      "label": "Package release date, txtai",
      "display": "Oct 2026",
      "asOf": "2026-10-06"
    },
    "F78": {
      "label": "Repository stars, txtai",
      "display": "13.5K",
      "asOf": "2026-11-17"
    },
    "F79": {
      "label": "Reranks results, txtai",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F80": {
      "label": "Metadata filters, txtai",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F81": {
      "label": "Source passages, txtai",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F82": {
      "label": "Install, txtai",
      "display": "pip install txtai",
      "asOf": "2026-11-17"
    },
    "F83": {
      "label": "What it does, txtai",
      "display": "Pairs semantic retrieval with generative, extractive, or custom answer pipelines.",
      "asOf": "2026-11-17"
    },
    "F84": {
      "label": "strengths lead, txtai",
      "display": "Combines SQL with similarity",
      "asOf": "2026-11-17"
    },
    "F85": {
      "label": "strengths, txtai",
      "display": "Add SQL filters to narrow semantic search results.",
      "asOf": "2026-11-17"
    },
    "F86": {
      "label": "strengths lead, txtai",
      "display": "Pairs retrieval with different models",
      "asOf": "2026-11-17"
    },
    "F87": {
      "label": "strengths, txtai",
      "display": "Use a generative model, extractive reader, or custom pipeline.",
      "asOf": "2026-11-17"
    },
    "F88": {
      "label": "limitations lead, txtai",
      "display": "SQL needs content storage",
      "asOf": "2026-11-17"
    },
    "F89": {
      "label": "limitations, txtai",
      "display": "Enable content storage before running SQL queries.",
      "asOf": "2026-11-17"
    },
    "F90": {
      "label": "limitations lead, txtai",
      "display": "References return a record ID",
      "asOf": "2026-11-17"
    },
    "F91": {
      "label": "limitations, txtai",
      "display": "Look up the matched record to inspect its original text.",
      "asOf": "2026-11-17"
    },
    "F92": {
      "label": "Quickstart, txtai",
      "display": "from txtai import Embeddings, RAG\n\n# Input data\ndata = [\n  \"US tops 5 million confirmed virus cases\",\n  \"Canada's last fully intact ice shelf has suddenly collapsed, \" +\n  \"forming a Manhattan-sized iceberg\",\n  \"Beijing mobilises invasion craft along coast as Taiwan tensions escalate\",\n  \"The National Park Service warns against sacrificing slower friends \" +\n  \"in a bear attack\",\n  \"Maine man wins $1M from $25 lottery ticket\",\n  \"Make huge profits without work, earn up to $100,000 a day\"\n]\n\n# Build embeddings index\nembeddings = Embeddings(content=True)\nembeddings.index(data)\n\n# Create the RAG pipeline\nrag = RAG(embeddings, \"Qwen/Qwen3-0.6B\", template=\"\"\"\n  Answer the following question using the provided context.\n\n  Question:\n  {question}\n\n  Context:\n  {context}\n\"\"\")\n\n# Run RAG pipeline\nrag(\"What was won?\")\n\n# Prompts with chat templating can be directly passed\n# The template format varies by model\nrag = RAG(embeddings, \"Qwen/Qwen3-0.6B\", template=\"\"\"\n  <|im_start|>system\n  You are a friendly assistant.<|im_end|>\n  <|im_start|>user\n  Answer the following question using the provided context.\n\n  Question:\n  {question}\n\n  Context:\n  {context}\n  <|im_start|>assistant\n  \"\"\"\n)\nrag(\"What was won?\")\n\n# Inputs are automatically converted to chat messages when a\n# system prompt is provided\nrag = RAG(\n  embeddings,\n  \"openai/gpt-oss-20b\",\n  system=\"You are a friendly assistant\",\n  template=\"\"\"\n  Answer the following question using the provided context.\n\n  Question:\n  {question}\n\n  Context:\n  {context}\n\"\"\")\nrag(\"What was won?\")\n\n# LLM options can be passed as additional arguments\n#  - Streaming RAG response with `stream=True`\n#  - String inputs are always converted to user messages with `defaultrole=\"user\"`\n#  - Thinking text is removed with `stripthink=True`\nrag(\"What was won?\", stream=True, defaultrole=\"user\", stripThink=True)\n\n",
      "asOf": "2026-11-17"
    },
    "F93": {
      "label": "Project function, txtai",
      "display": "def addurl(self, url):\n    \"\"\"\n    Adds content at URL to this embeddings index.\n\n    Args:\n        url: input url\n    \"\"\"\n\n    # Store number in index before indexing\n    start = self.embeddings.count()\n\n    # Add file to embeddings index\n    self.embeddings.upsert(self.extract(url))\n\n    # Create LLM-generated topics\n    self.infertopics(self.embeddings, start)\n\n    # Save embeddings, if necessary\n    self.persist(self.embeddings)\n",
      "asOf": "2026-11-17"
    },
    "F94": {
      "label": "Project function reference, txtai",
      "display": "rag.py · addurl()",
      "asOf": "2026-11-17"
    },
    "F95": {
      "label": "Project repository, txtai",
      "display": "av/harbor",
      "asOf": "2026-11-17"
    },
    "F96": {
      "label": "Project stars, av/harbor",
      "display": "3.3K",
      "asOf": "2026-11-17"
    },
    "F97": {
      "label": "Project push date, av/harbor",
      "display": "Nov 2026",
      "asOf": "2026-11-11"
    },
    "F98": {
      "label": "Developer need",
      "display": "Inspecting retrieved source chunks",
      "asOf": "2026-11-17"
    },
    "F99": {
      "label": "Why choose llama-index-core",
      "display": "source nodes and formatted source text",
      "asOf": "2026-11-17"
    },
    "F100": {
      "label": "Developer need in introduction",
      "display": "inspecting retrieved source chunks",
      "asOf": "2026-11-17"
    },
    "F101": {
      "label": "When to consider haystack-ai",
      "display": "each context-processing stage needs explicit wiring",
      "asOf": "2026-11-17"
    },
    "F102": {
      "label": "Developer need",
      "display": "Controlling each context-processing stage",
      "asOf": "2026-11-17"
    },
    "F103": {
      "label": "Why choose haystack-ai",
      "display": "explicit retrieval, ranking, and routing",
      "asOf": "2026-11-17"
    },
    "F104": {
      "label": "Developer need in introduction",
      "display": "controlling each context-processing stage",
      "asOf": "2026-11-17"
    },
    "F105": {
      "label": "When to consider txtai",
      "display": "SQL-based retrieval filters are the priority",
      "asOf": "2026-11-17"
    },
    "F106": {
      "label": "Developer need",
      "display": "Combining semantic search with SQL",
      "asOf": "2026-11-17"
    },
    "F107": {
      "label": "Why choose txtai",
      "display": "SQL filters around similarity results",
      "asOf": "2026-11-17"
    },
    "F108": {
      "label": "Developer need in introduction",
      "display": "combining semantic search with SQL",
      "asOf": "2026-11-17"
    },
    "F109": {
      "label": "When to consider llama-index-core",
      "display": "response-side source nodes are the priority",
      "asOf": "2026-11-17"
    },
    "F110": {
      "label": "Developer need",
      "display": "Combining graph and vector context",
      "asOf": "2026-11-17"
    },
    "F111": {
      "label": "Why choose lightrag-hku",
      "display": "mixed knowledge-graph and vector retrieval",
      "asOf": "2026-11-17"
    },
    "F112": {
      "label": "Developer need in introduction",
      "display": "combining graph and vector context",
      "asOf": "2026-11-17"
    },
    "F113": {
      "label": "When to consider llama-index-core",
      "display": "document metadata predicates are the priority",
      "asOf": "2026-11-17"
    },
    "F114": {
      "label": "Page introduction",
      "display": "Python RAG libraries let application developers combine document retrieval with generated answers.",
      "asOf": "2026-11-17"
    },
    "F115": {
      "label": "FAQ: How does this differ from choosing an LLM framework?",
      "display": "This comparison focuses on the prompt, retrieved context store, and answer model working together.",
      "asOf": "2026-11-17"
    },
    "F116": {
      "label": "FAQ: Can source text be inspected before trusting an answer?",
      "display": "LlamaIndex response objects expose formatted source text from source nodes.",
      "asOf": "2026-11-17"
    },
    "F117": {
      "label": "FAQ: Can source text be inspected before trusting an answer?",
      "display": "LightRAG aquery_data retrieves structured context without generating an answer.",
      "asOf": "2026-11-17"
    },
    "F118": {
      "label": "FAQ: Does a returned reference prove that a generated claim is supported?",
      "display": "Txtai references an answer with the best matching context element ID; inspect the record itself.",
      "asOf": "2026-11-17"
    },
    "F119": {
      "label": "FAQ: Does a returned reference prove that a generated claim is supported?",
      "display": "Haystack AnswerBuilder can parse references by their position in the supplied document list.",
      "asOf": "2026-11-17"
    },
    "F120": {
      "label": "FAQ: How can semantic results be filtered with SQL?",
      "display": "Enable txtai content storage, then use its SQL translation layer around similarity results.",
      "asOf": "2026-11-17"
    },
    "F121": {
      "label": "FAQ: Why can an older LlamaIndex store reject metadata filters?",
      "display": "A store persisted without metadata must be rebuilt with metadata before it can filter.",
      "asOf": "2026-11-17"
    },
    "F122": {
      "label": "FAQ: Are Haystack filter operators identical for every store?",
      "display": "Available comparison operators depend on the selected Document Store integration.",
      "asOf": "2026-11-17"
    },
    "F123": {
      "label": "FAQ: Does reranking require extra installation?",
      "display": "Haystack SentenceTransformersSimilarityRanker needs the sentence-transformers-haystack integration.",
      "asOf": "2026-11-17"
    },
    "F124": {
      "label": "FAQ: Does reranking require extra installation?",
      "display": "LlamaIndex local cross-encoder reranking uses sentence-transformers.",
      "asOf": "2026-11-17"
    },
    "F125": {
      "label": "FAQ: Can independent retrieval branches run concurrently?",
      "display": "Haystack AsyncPipeline runs independent components concurrently when their dependencies allow it.",
      "asOf": "2026-11-17"
    },
    "F126": {
      "label": "FAQ: Does LightRAG mix mode mean the same thing as hybrid search elsewhere?",
      "display": "Its mix mode integrates knowledge-graph and vector retrieval.",
      "asOf": "2026-11-17"
    },
    "F127": {
      "label": "FAQ: Are LightRAG default stores meant for production?",
      "display": "Its own README limits the in-memory default stores to small-scale testing, evaluation, and debugging.",
      "asOf": "2026-11-17"
    },
    "F128": {
      "label": "FAQ: Can an embedding model be changed after indexing?",
      "display": "LightRAG requires chunks, entities, and relationships to be re-embedded after changing the embedding model.",
      "asOf": "2026-11-17"
    },
    "F129": {
      "label": "FAQ: Can the retrieved knowledge graph be exported as files?",
      "display": "LightRAG export_data supports CSV, Markdown tables, and plain text.",
      "asOf": "2026-11-17"
    },
    "F130": {
      "label": "Library name, boto3",
      "display": "Boto3",
      "asOf": "2026-11-20"
    },
    "F131": {
      "label": "Monthly downloads, boto3",
      "display": "2.5B",
      "asOf": "2026-11-20"
    },
    "F132": {
      "label": "License, boto3",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F133": {
      "label": "Package release, boto3",
      "display": "1.44.6",
      "asOf": "2026-11-20"
    },
    "F134": {
      "label": "Package release date, boto3",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F135": {
      "label": "Install, boto3",
      "display": "pip install boto3",
      "asOf": "2026-11-20"
    },
    "F136": {
      "label": "Quickstart, boto3",
      "display": "import boto3\n\nclient = boto3.client('bedrock-agent-runtime')\nresponse = client.retrieve_and_generate(\n    input={'text': 'What is the refund policy?'},\n    retrieveAndGenerateConfiguration={\n        'type': 'KNOWLEDGE_BASE',\n        'knowledgeBaseConfiguration': {\n            'knowledgeBaseId': 'YOUR_KNOWLEDGE_BASE_ID',\n            'modelArn': 'YOUR_SUPPORTED_MODEL_ARN',\n        },\n    },\n)\nprint(response['output']['text'])\n",
      "asOf": "2026-11-20"
    },
    "F137": {
      "label": "Official description, boto3",
      "display": "The AWS SDK for Python (Boto3)",
      "asOf": "2026-11-20"
    },
    "F138": {
      "label": "Quickstart source file, boto3",
      "display": "reference/services/bedrock-agent-runtime/client/retrieve_and_generate.html",
      "asOf": "2026-11-20"
    },
    "F139": {
      "label": "Repository stars, boto3",
      "display": "9.9K",
      "asOf": "2026-11-20"
    },
    "F140": {
      "label": "File/corpus loading API, boto3",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F141": {
      "label": "In-process corpus index, boto3",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F142": {
      "label": "Native RAG role and backend, boto3",
      "display": "Provider-native Bedrock Knowledge Bases ingestion/runtime client; managed service infrastructure and compatible model/region are prerequisites.",
      "asOf": "2026-11-20"
    },
    "F143": {
      "label": "First-call prerequisites, boto3",
      "display": "Configured AWS credentials, permitted region/model, and an already-ingested Bedrock Knowledge Base. This first call queries an existing service corpus; it does not create infrastructure.",
      "asOf": "2026-11-20"
    },
    "F144": {
      "label": "Project function, boto3",
      "display": "def _get_relevant_documents(\n    self,\n    query: str,\n    *,\n    run_manager: CallbackManagerForRetrieverRun,\n) -> List[Document]:\n    \"\"\"Get relevant document from a KnowledgeBase\n\n    Parameters:\n        query: The user's query.\n        run_manager: The callback handler to use.\n\n    Returns:\n        A list of relevant documents.\n\n    \"\"\"\n    retrieve_request: Dict[str, Any] = self._get_retrieve_request(query)\n    response = self.client.retrieve(**retrieve_request)\n    results = response[\"retrievalResults\"]\n    documents: List[Document] = (\n        AmazonKnowledgeBasesRetriever._retrieval_results_to_documents(results)\n    )\n\n    return self._filter_by_score_confidence(docs=documents)\n",
      "asOf": "2026-11-20"
    },
    "F145": {
      "label": "Project source file, boto3",
      "display": "libs/aws/langchain_aws/retrievers/bedrock.py",
      "asOf": "2026-11-20"
    },
    "F146": {
      "label": "Project full_name, boto3",
      "display": "langchain-ai/langchain-aws",
      "asOf": "2026-11-20"
    },
    "F147": {
      "label": "Project stargazers_count, boto3",
      "display": "353",
      "asOf": "2026-11-20"
    },
    "F148": {
      "label": "Library name, openai",
      "display": "OpenAI File Search",
      "asOf": "2026-11-20"
    },
    "F149": {
      "label": "Monthly downloads, openai",
      "display": "384.4M",
      "asOf": "2026-11-20"
    },
    "F150": {
      "label": "License, openai",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F151": {
      "label": "Package release, openai",
      "display": "3.55.1",
      "asOf": "2026-11-20"
    },
    "F152": {
      "label": "Package release date, openai",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F153": {
      "label": "Install, openai",
      "display": "pip install openai",
      "asOf": "2026-11-20"
    },
    "F154": {
      "label": "Quickstart, openai",
      "display": "from openai import OpenAI\n\nclient = OpenAI()\n\nresponse = client.responses.create(\n    model=\"gpt-6.2-astra\",\n    input=\"What is deep research by OpenAI?\",\n    tools=[{\"type\": \"file_search\", \"vector_store_ids\": [\"<vector_store_id>\"]}],\n)\nprint(response)\n\n",
      "asOf": "2026-11-20"
    },
    "F155": {
      "label": "Official description, openai",
      "display": "The official Python library for the openai API",
      "asOf": "2026-11-20"
    },
    "F156": {
      "label": "Quickstart source file, openai",
      "display": "guides/tools-file-search.md",
      "asOf": "2026-11-20"
    },
    "F157": {
      "label": "Repository stars, openai",
      "display": "32.2K",
      "asOf": "2026-11-20"
    },
    "F158": {
      "label": "File/corpus loading API, openai",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F159": {
      "label": "In-process corpus index, openai",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F160": {
      "label": "Native RAG role and backend, openai",
      "display": "Provider-native hosted vector stores and Responses File Search; uploads/chunking/retrieval are managed service work, not local embeddings.",
      "asOf": "2026-11-20"
    },
    "F161": {
      "label": "First-call prerequisites, openai",
      "display": "OPENAI_API_KEY and an existing vector store containing indexed files. Replace the documented vector-store placeholder; use a currently available model for the account. File search is the hosted tool, not client-side embedding inference.",
      "asOf": "2026-11-20"
    },
    "F162": {
      "label": "Project function, openai",
      "display": "@mcp.tool()\nasync def fetch(id: str) -> Dict[str, Any]:\n    \"\"\"\n    Retrieve complete document content by ID for detailed analysis and citation.\n\n    This tool fetches the full document content from OpenAI Vector Store or local storage.\n    Use this after finding relevant documents with the search tool to get complete \n    information for analysis and proper citation.\n\n    Args:\n        id: File ID from vector store (file-xxx) or local document ID\n\n    Returns:\n        Complete document with id, title, full text content, optional URL, and metadata\n\n    Raises:\n        ValueError: If the specified ID is not found\n    \"\"\"\n    if not id:\n        raise ValueError(\"Document ID is required\")\n\n    if not openai_client:\n        logger.error(\"OpenAI client not initialized - API key missing\")\n        raise ValueError(\n            \"OpenAI API key is required for vector store file retrieval\")\n\n    logger.info(f\"Fetching content from vector store for file ID: {id}\")\n\n    # Fetch file content from vector store\n    content_response = openai_client.vector_stores.files.content(\n        vector_store_id=VECTOR_STORE_ID, file_id=id)\n\n    # Get file metadata\n    file_info = openai_client.vector_stores.files.retrieve(\n        vector_store_id=VECTOR_STORE_ID, file_id=id)\n\n    # Extract content from paginated response\n    file_content = \"\"\n    if hasattr(content_response, 'data') and content_response.data:\n        # Combine all content chunks from FileContentResponse objects\n        content_parts = []\n        for content_item in content_response.data:\n            if hasattr(content_item, 'text'):\n                content_parts.append(content_item.text)\n        file_content = \"\\n\".join(content_parts)\n    else:\n        file_content = \"No content available\"\n\n    # Use filename as title and create proper URL for citations\n    filename = getattr(file_info, 'filename', f\"Document {id}\")\n\n    result = {\n        \"id\": id,\n        \"title\": filename,\n        \"text\": file_content,\n        \"url\": f\"https://platform.openai.com/storage/files/{id}\",\n        \"metadata\": None\n    }\n\n    # Add metadata if available from file info\n    if hasattr(file_info, 'attributes') and file_info.attributes:\n        result[\"metadata\"] = file_info.attributes\n\n    logger.info(f\"Successfully fetched vector store file: {id}\")\n    return result\n",
      "asOf": "2026-11-20"
    },
    "F163": {
      "label": "Project source file, openai",
      "display": "examples/deep_research_api/how_to_build_a_deep_research_mcp_server/main.py",
      "asOf": "2026-11-20"
    },
    "F164": {
      "label": "Project full_name, openai",
      "display": "openai/openai-cookbook",
      "asOf": "2026-11-20"
    },
    "F165": {
      "label": "Project stargazers_count, openai",
      "display": "77.2K",
      "asOf": "2026-11-20"
    },
    "F166": {
      "label": "Library name, google-genai",
      "display": "Gemini File Search",
      "asOf": "2026-11-20"
    },
    "F167": {
      "label": "Monthly downloads, google-genai",
      "display": "168.8M",
      "asOf": "2026-11-20"
    },
    "F168": {
      "label": "License, google-genai",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F169": {
      "label": "Package release, google-genai",
      "display": "3.6.1",
      "asOf": "2026-11-20"
    },
    "F170": {
      "label": "Package release date, google-genai",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F171": {
      "label": "Install, google-genai",
      "display": "pip install google-genai",
      "asOf": "2026-11-20"
    },
    "F172": {
      "label": "Quickstart, google-genai",
      "display": "from google import genai\n\nclient = genai.Client()\ninteraction = client.interactions.create(\n    model='YOUR_SUPPORTED_GEMINI_MODEL',\n    input='What is the refund policy?',\n    tools=[{'type': 'file_search', 'file_search_store_names': ['YOUR_FILE_SEARCH_STORE_NAME']}],\n)\nprint(interaction)\n",
      "asOf": "2026-11-20"
    },
    "F173": {
      "label": "Official description, google-genai",
      "display": "GenAI Python SDK",
      "asOf": "2026-11-20"
    },
    "F174": {
      "label": "Quickstart source file, google-genai",
      "display": "gemini-api/docs/file-search",
      "asOf": "2026-11-20"
    },
    "F175": {
      "label": "Repository stars, google-genai",
      "display": "4.1K",
      "asOf": "2026-11-20"
    },
    "F176": {
      "label": "File/corpus loading API, google-genai",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F177": {
      "label": "In-process corpus index, google-genai",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F178": {
      "label": "Native RAG role and backend, google-genai",
      "display": "Provider-native Gemini File Search stores, plus a distinct enterprise Vertex/Agent Platform RAG retrieval tool path. Resource names/backends are not interchangeable.",
      "asOf": "2026-11-20"
    },
    "F179": {
      "label": "First-call prerequisites, google-genai",
      "display": "GEMINI_API_KEY/GOOGLE_API_KEY and a populated File Search store, a compatible currently available model, and enabled service access. Current official File Search uses Interactions, not a historical GenerateContent recipe. This first call prints the response object; annotated text is in model_output step content blocks.",
      "asOf": "2026-11-20"
    },
    "F180": {
      "label": "Original project function contract, google-genai",
      "display": "This is original ADK published-framework integration consuming google.genai.types, not copied GenAI SDK implementation. Existing native VertexRagStore is injected through documented Retrieval/Tool/GenerateContentConfig. Empty config and tools-list initialization are preserved. Gemini branch configures native retrieval; non-Gemini branch delegates to ADK super (not counted as GenAI). This workflow specifically uses Vertex/Agent Platform RAG, distinct from Gemini API File Search stores used in the quickstart.",
      "asOf": "2026-11-20"
    },
    "F181": {
      "label": "Project function, google-genai",
      "display": "@override\nasync def process_llm_request(\n    self,\n    *,\n    tool_context: ToolContext,\n    llm_request: LlmRequest,\n) -> None:\n  # Use Gemini built-in Vertex AI RAG tool for Gemini models.\n  model_check_disabled = is_gemini_model_id_check_disabled()\n  if is_gemini_model(llm_request.model) or model_check_disabled:\n    llm_request.config = (\n        types.GenerateContentConfig()\n        if not llm_request.config\n        else llm_request.config\n    )\n    llm_request.config.tools = (\n        [] if not llm_request.config.tools else llm_request.config.tools\n    )\n    llm_request.config.tools.append(\n        types.Tool(\n            retrieval=types.Retrieval(vertex_rag_store=self.vertex_rag_store)\n        )\n    )\n  else:\n    # Add the function declaration to the tools\n    await super().process_llm_request(\n        tool_context=tool_context, llm_request=llm_request\n    )\n",
      "asOf": "2026-11-20"
    },
    "F182": {
      "label": "Project source file, google-genai",
      "display": "src/google/adk/tools/retrieval/vertex_ai_rag_retrieval.py",
      "asOf": "2026-11-20"
    },
    "F183": {
      "label": "Project full_name, google-genai",
      "display": "google/adk-python",
      "asOf": "2026-11-20"
    },
    "F184": {
      "label": "Project stargazers_count, google-genai",
      "display": "22.3K",
      "asOf": "2026-11-20"
    },
    "F185": {
      "label": "Library name, langchain-classic",
      "display": "LangChain Classic",
      "asOf": "2026-11-20"
    },
    "F186": {
      "label": "Monthly downloads, langchain-classic",
      "display": "17.3M",
      "asOf": "2026-11-20"
    },
    "F187": {
      "label": "License, langchain-classic",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F188": {
      "label": "Package release, langchain-classic",
      "display": "1.0.8",
      "asOf": "2026-11-20"
    },
    "F189": {
      "label": "Package release date, langchain-classic",
      "display": "Jun 2026",
      "asOf": "2026-11-20"
    },
    "F190": {
      "label": "Install, langchain-classic",
      "display": "pip install langchain-classic langchain-openai",
      "asOf": "2026-11-20"
    },
    "F191": {
      "label": "Quickstart, langchain-classic",
      "display": "from langchain_core.documents import Document\nfrom langchain_core.vectorstores import InMemoryVectorStore\nfrom langchain_core.prompts import ChatPromptTemplate\nfrom langchain_openai import ChatOpenAI, OpenAIEmbeddings\nfrom langchain_classic.chains import create_retrieval_chain\nfrom langchain_classic.chains.combine_documents import create_stuff_documents_chain\n\nstore = InMemoryVectorStore(OpenAIEmbeddings())\nstore.add_documents([Document(page_content='Refunds are available for 30 days.')])\nprompt = ChatPromptTemplate.from_messages([('system', 'Answer from this context: {context}'), ('human', '{input}')])\ncombine = create_stuff_documents_chain(ChatOpenAI(), prompt)\nchain = create_retrieval_chain(store.as_retriever(), combine)\nprint(chain.invoke({'input': 'When can I get a refund?'})['answer'])\n",
      "asOf": "2026-11-20"
    },
    "F192": {
      "label": "Official description, langchain-classic",
      "display": "Building applications with LLMs through composability",
      "asOf": "2026-11-20"
    },
    "F193": {
      "label": "Quickstart source file, langchain-classic",
      "display": "chains/retrieval.py and oss/python/langchain/rag",
      "asOf": "2026-11-20"
    },
    "F194": {
      "label": "Repository stars, langchain-classic",
      "display": "149.6K",
      "asOf": "2026-11-20"
    },
    "F195": {
      "label": "File/corpus loading API, langchain-classic",
      "display": "Via plugin",
      "asOf": "2026-11-20"
    },
    "F196": {
      "label": "In-process corpus index, langchain-classic",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F197": {
      "label": "Native RAG role and backend, langchain-classic",
      "display": "Concrete retriever-to-document-combiner chain factory, currently shipped in classic; main/core/deepagents distribution roles and migration recommendation remain separate family facts.",
      "asOf": "2026-11-20"
    },
    "F198": {
      "label": "First-call prerequisites, langchain-classic",
      "display": "OPENAI_API_KEY plus installed langchain-core and langchain-openai integration dependencies. Embedding and answer generation use remote models even though the vector index is in-process.",
      "asOf": "2026-11-20"
    },
    "F199": {
      "label": "Original project function contract, langchain-classic",
      "display": "The intact host imports create_retrieval_chain and create_stuff_documents_chain from langchain_classic, builds a retriever and compatible prompt with context/input, then passes {'input':last_user_message} to the returned Runnable. Current function contract explicitly returns answer/context. Third-party OpenRouter model availability, host FastAPI/Pydantic versions, trusted FAISS files, and prompt-only confidentiality instructions are not asserted secure or operational.",
      "asOf": "2026-11-20"
    },
    "F200": {
      "label": "Project function, langchain-classic",
      "display": "@app.post(\"/v1/chat/completions\", response_model=ChatCompletionResponse)\nasync def chat_completions(request: ChatCompletionRequest):\n    try:\n        # Retrieve last message\n        last_user_message = request.messages[-1].content\n        print(f\"[RAG] Received query: {last_user_message}\")\n\n        # Execute RAG\n        if \"rag_chain\" not in globals():\n            raise HTTPException(\n                status_code=500, detail=\"The RAG system was not correctly initialized.\"\n            )\n\n        response = rag_chain.invoke({\"input\": last_user_message})\n        answer_text = response[\"answer\"]\n\n        # Answer\n        return ChatCompletionResponse(\n            id=f\"chatcmpl-{uuid.uuid4()}\",\n            created=int(time.time()),\n            model=\"google/gemma-3n-e4b-it\",  # we return the RAG LLM name for compatibility, but it's not actually used by the client since we run a custom RAG chain\n            choices=[\n                ChatCompletionResponseChoice(\n                    index=0,\n                    message=Message(role=\"assistant\", content=answer_text),\n                    finish_reason=\"stop\",\n                )\n            ],\n            usage={\"prompt_tokens\": 0, \"completion_tokens\": 0, \"total_tokens\": 0},\n        )\n\n    except Exception as e:\n        print(f\"SERVER ERRROR: {str(e)}\")\n        raise HTTPException(status_code=500, detail=str(e))\n",
      "asOf": "2026-11-20"
    },
    "F201": {
      "label": "Project source file, langchain-classic",
      "display": "hackagent/examples/langchain/rag/agent_server.py",
      "asOf": "2026-11-20"
    },
    "F202": {
      "label": "Project full_name, langchain-classic",
      "display": "AISecurityLab/hackagent",
      "asOf": "2026-11-20"
    },
    "F203": {
      "label": "Project stargazers_count, langchain-classic",
      "display": "541",
      "asOf": "2026-11-20"
    },
    "F204": {
      "label": "Library name, google-adk",
      "display": "Google ADK",
      "asOf": "2026-11-20"
    },
    "F205": {
      "label": "Monthly downloads, google-adk",
      "display": "11.0M",
      "asOf": "2026-11-20"
    },
    "F206": {
      "label": "License, google-adk",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F207": {
      "label": "Package release, google-adk",
      "display": "2.14.1",
      "asOf": "2026-11-20"
    },
    "F208": {
      "label": "Package release date, google-adk",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F209": {
      "label": "Install, google-adk",
      "display": "pip install google-adk",
      "asOf": "2026-11-20"
    },
    "F210": {
      "label": "Quickstart, google-adk",
      "display": "import asyncio\nimport os\nfrom google.adk.agents import Agent\nfrom google.adk.runners import InMemoryRunner\nfrom google.adk.tools.retrieval.vertex_ai_rag_retrieval import VertexAiRagRetrieval\n\nasync def main():\n    retrieval = VertexAiRagRetrieval(name='retrieve_docs', description='Retrieve document context.', rag_resources=[{'rag_corpus': os.environ['RAG_CORPUS']}])\n    agent = Agent(name='assistant', model=os.environ['GEMINI_MODEL'], instruction='Answer from retrieved documents.', tools=[retrieval])\n    runner = InMemoryRunner(agent=agent)\n    await runner.run_debug('What is the refund policy?')\n\nasyncio.run(main())\n",
      "asOf": "2026-11-20"
    },
    "F211": {
      "label": "Official description, google-adk",
      "display": "Agent Development Kit",
      "asOf": "2026-11-20"
    },
    "F212": {
      "label": "Quickstart source file, google-adk",
      "display": "src/google/adk/runners.py and tools/retrieval/vertex_ai_rag_retrieval.py",
      "asOf": "2026-11-20"
    },
    "F213": {
      "label": "Repository stars, google-adk",
      "display": "22.3K",
      "asOf": "2026-11-20"
    },
    "F214": {
      "label": "File/corpus loading API, google-adk",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F215": {
      "label": "In-process corpus index, google-adk",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F216": {
      "label": "Native RAG role and backend, google-adk",
      "display": "Agent-framework retrieval tool adapter. Native Gemini tool attachment and non-Gemini retrieve_contexts bridge are substantive orchestration; corpus service is shared Google backend, not a new storage engine.",
      "asOf": "2026-11-20"
    },
    "F217": {
      "label": "First-call prerequisites, google-adk",
      "display": "Configured Google cloud/GenAI credentials, a compatible model, and a populated Vertex/Agent Platform RAG corpus named by RAG_CORPUS. This is an explicit original API recipe adding the current documented retrieval tool to the official first-call runner pattern.",
      "asOf": "2026-11-20"
    },
    "F218": {
      "label": "Project function, google-adk",
      "display": "def create_search_tool(\n    data_store_path: str,\n) -> VertexAiSearchTool | Callable[[str], str]:\n    \"\"\"Create a Agent Platform Search tool or mock for testing.\n\n    Args:\n        data_store_path: Full resource path of the datastore.\n\n    Returns:\n        VertexAiSearchTool instance or mock function for testing.\n    \"\"\"\n    # For integration tests, return a mock function instead of the real tool\n    if os.getenv(\"INTEGRATION_TEST\") == \"TRUE\":\n\n        def mock_search(query: str) -> str:\n            \"\"\"Mock Agent Platform Search for integration tests.\"\"\"\n            return \"Mock search result for testing purposes.\"\n\n        return mock_search\n\n    return VertexAiSearchTool(data_store_id=data_store_path)\n",
      "asOf": "2026-11-20"
    },
    "F219": {
      "label": "Project source file, google-adk",
      "display": "core/python/rag-agent-search/app/retrievers.py",
      "asOf": "2026-11-20"
    },
    "F220": {
      "label": "Project full_name, google-adk",
      "display": "google/adk-recipes",
      "asOf": "2026-11-20"
    },
    "F221": {
      "label": "Project stargazers_count, google-adk",
      "display": "10.7K",
      "asOf": "2026-11-20"
    },
    "F222": {
      "label": "Library name, azure-ai-projects",
      "display": "Foundry File Search",
      "asOf": "2026-11-20"
    },
    "F223": {
      "label": "Monthly downloads, azure-ai-projects",
      "display": "8.0M",
      "asOf": "2026-11-20"
    },
    "F224": {
      "label": "License, azure-ai-projects",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F225": {
      "label": "Package release, azure-ai-projects",
      "display": "2.11.0",
      "asOf": "2026-11-20"
    },
    "F226": {
      "label": "Package release date, azure-ai-projects",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F227": {
      "label": "Install, azure-ai-projects",
      "display": "pip install azure-ai-projects azure-identity",
      "asOf": "2026-11-20"
    },
    "F228": {
      "label": "Quickstart, azure-ai-projects",
      "display": "import os\nfrom azure.identity import DefaultAzureCredential\nfrom azure.ai.projects import AIProjectClient\nfrom azure.ai.projects.models import FileSearchTool, PromptAgentDefinition\n\nwith AIProjectClient(endpoint=os.environ['FOUNDRY_PROJECT_ENDPOINT'], credential=DefaultAzureCredential()) as project:\n    agent = project.agents.create_version(\n        agent_name='document-assistant',\n        definition=PromptAgentDefinition(\n            model=os.environ['FOUNDRY_MODEL_NAME'],\n            tools=[FileSearchTool(vector_store_ids=[os.environ['VECTOR_STORE_ID']])],\n        ),\n    )\n    print(agent.name)\n",
      "asOf": "2026-11-20"
    },
    "F229": {
      "label": "Official description, azure-ai-projects",
      "display": "Microsoft Corporation Azure Ai Projects Client Library for Python",
      "asOf": "2026-11-20"
    },
    "F230": {
      "label": "Quickstart source file, azure-ai-projects",
      "display": "sdk/ai/azure-ai-projects/samples/agents/tools/sample_agent_file_search.py",
      "asOf": "2026-11-20"
    },
    "F231": {
      "label": "Repository stars, azure-ai-projects",
      "display": "5.6K",
      "asOf": "2026-11-20"
    },
    "F232": {
      "label": "File/corpus loading API, azure-ai-projects",
      "display": "Via plugin",
      "asOf": "2026-11-20"
    },
    "F233": {
      "label": "In-process corpus index, azure-ai-projects",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F234": {
      "label": "Native RAG role and backend, azure-ai-projects",
      "display": "Current Foundry agent/version API configures FileSearchTool; get_openai_client exposes a separate OpenAI SDK for vector-store ingestion and response execution. This is Projects2, not old Agents1 signatures.",
      "asOf": "2026-11-20"
    },
    "F235": {
      "label": "First-call prerequisites, azure-ai-projects",
      "display": "Install azure-identity separately, authenticate an authorized identity, and supply a current Foundry project endpoint/model deployment and a populated project-compatible OpenAI vector store. This shortest first call creates a configured agent version; the task example source also shows subsequent responses, which are not claimed to run here.",
      "asOf": "2026-11-20"
    },
    "F236": {
      "label": "Project function, azure-ai-projects",
      "display": "def main():\n    parser = argparse.ArgumentParser(\n        description=\"Create and ground the caldova-knowledge-agent.\"\n    )\n    parser.add_argument(\n        \"--force\",\n        action=\"store_true\",\n        help=\"Create a new version even if the agent already exists.\",\n    )\n    args = parser.parse_args()\n\n    load_dotenv(ENV_PATH)\n    project_endpoint = os.getenv(\"PROJECT_ENDPOINT\")\n    model_deployment = os.getenv(\"MODEL_DEPLOYMENT_NAME\")\n\n    if not project_endpoint:\n        fail(\"PROJECT_ENDPOINT is not set in Python/.env. Run 'azd up' or set it from the portal.\")\n    if not model_deployment:\n        fail(\"MODEL_DEPLOYMENT_NAME is not set in Python/.env. Set it to your deployed model name.\")\n\n    data_files = sorted(DATA_DIR.glob(\"*.md\"))\n    if not data_files:\n        fail(f\"No knowledge documents found in {DATA_DIR}.\")\n\n    print(\"Connecting to your Foundry project ...\")\n    with (\n        DefaultAzureCredential() as credential,\n        AIProjectClient(endpoint=project_endpoint, credential=credential) as project_client,\n        project_client.get_openai_client() as openai_client,\n    ):\n        if agent_exists(project_client) and not args.force:\n            print(f\"\\nAgent '{AGENT_NAME}' already exists - nothing to do.\")\n            print(\"Re-run with --force to add a new grounded version.\")\n            set_env_value(\"AGENT_NAME\", AGENT_NAME)\n            print(f\"Ensured AGENT_NAME={AGENT_NAME} in {ENV_PATH}\")\n            return\n\n        print(f\"Grounding the agent (this uploads {len(data_files)} knowledge documents):\")\n        file_ids = [upload_file(openai_client, path) for path in data_files]\n        vector_store_id = build_vector_store(openai_client, file_ids)\n\n        file_search = FileSearchTool(vector_store_ids=[vector_store_id])\n\n        print(\"Creating the agent ...\")\n        agent = project_client.agents.create_version(\n            agent_name=AGENT_NAME,\n            definition=PromptAgentDefinition(\n                model=model_deployment,\n                instructions=INSTRUCTIONS,\n                tools=[file_search],\n            ),\n        )\n        print(f\"  Created '{agent.name}' (version {agent.version}).\")\n\n    set_env_value(\"AGENT_NAME\", AGENT_NAME)\n    print(f\"\\nWrote AGENT_NAME={AGENT_NAME} to {ENV_PATH}\")\n    print(\"You're ready to connect from code: run 'python knowledge_agent.py' from the Python folder.\")\n",
      "asOf": "2026-11-20"
    },
    "F237": {
      "label": "Project source file, azure-ai-projects",
      "display": "Labfiles/B-integrate-agents-with-enterprise-knowledge-and-m365/setup/bootstrap_agent.py",
      "asOf": "2026-11-20"
    },
    "F238": {
      "label": "Project full_name, azure-ai-projects",
      "display": "MicrosoftLearning/mslearn-ai-agents",
      "asOf": "2026-11-20"
    },
    "F239": {
      "label": "Project stargazers_count, azure-ai-projects",
      "display": "355",
      "asOf": "2026-11-20"
    },
    "F240": {
      "label": "Library name, dspy",
      "display": "DSPy",
      "asOf": "2026-11-20"
    },
    "F241": {
      "label": "Monthly downloads, dspy",
      "display": "5.9M",
      "asOf": "2026-11-20"
    },
    "F242": {
      "label": "License, dspy",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F243": {
      "label": "Package release, dspy",
      "display": "3.5.0",
      "asOf": "2026-11-20"
    },
    "F244": {
      "label": "Package release date, dspy",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F245": {
      "label": "Install, dspy",
      "display": "pip install dspy[numpy]",
      "asOf": "2026-11-20"
    },
    "F246": {
      "label": "Quickstart, dspy",
      "display": "import dspy\n\ndspy.configure(lm=dspy.LM('YOUR_CONFIGURED_LM'))\nsearch = dspy.retrievers.Embeddings(\n    embedder=dspy.Embedder('openai/text-embedding-3-small', dimensions=512),\n    corpus=['Refunds are available for 30 days.'], k=1, brute_force_threshold=30000,\n)\nanswer = dspy.ChainOfThought('context, question -> response')\nquestion = 'When can I get a refund?'\ncontext = search(question).passages\nprint(answer(context=context, question=question).response)\n",
      "asOf": "2026-11-20"
    },
    "F247": {
      "label": "Official description, dspy",
      "display": "The framework for programming, rather than prompting, language models.",
      "asOf": "2026-11-20"
    },
    "F248": {
      "label": "Quickstart source file, dspy",
      "display": "docs/docs/tutorials/rag/index.ipynb",
      "asOf": "2026-11-20"
    },
    "F249": {
      "label": "Repository stars, dspy",
      "display": "39.1K",
      "asOf": "2026-11-20"
    },
    "F250": {
      "label": "File/corpus loading API, dspy",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F251": {
      "label": "In-process corpus index, dspy",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F252": {
      "label": "Native RAG role and backend, dspy",
      "display": "Programmable RAG: native Embeddings/Retrieve modules and LM modules are composed in a user program. Corpus loading/configured retrieval-model requirements differ between the tutorial and benchmark example.",
      "asOf": "2026-11-20"
    },
    "F253": {
      "label": "First-call prerequisites, dspy",
      "display": "Set a real provider-prefixed LM and credentials; hosted OpenAI embeddings need OPENAI_API_KEY and an installed OpenAI SDK. NumPy extra supplies local vector operations; the supplied brute-force threshold avoids requiring FAISS for this tiny corpus.",
      "asOf": "2026-11-20"
    },
    "F254": {
      "label": "Original project function contract, dspy",
      "display": "Original DsPyVanillaRAG.__init__ binds dspy.Retrieve(k=passages_per_hop) and ChainOfThought(GenerateAnswer). Complete forward receives question, uses the configured RM via Retrieve, passes passages and question matching the signature inputs, and constructs Prediction. Current public retrievers/__init__ and dspy/__init__ exports plus Retrieve.forward/Predict docs verify actual bindings; old benchmark pin does not disqualify compatible APIs. Caller must configure LM and retrieval model; this function does not ingest its own corpus.",
      "asOf": "2026-11-20"
    },
    "F255": {
      "label": "Project function, dspy",
      "display": "def forward(self, question):\n\n    passages = self.retrieve(question).passages\n\n    pred = self.generate_answer(context=passages, question=question)\n    return dspy.Prediction(context=passages, answer=pred.answer)\n",
      "asOf": "2026-11-20"
    },
    "F256": {
      "label": "Project source file, dspy",
      "display": "benchmarks/hotpot_qa/dspy_vanilla_rag.py",
      "asOf": "2026-11-20"
    },
    "F257": {
      "label": "Project full_name, dspy",
      "display": "SylphAI-Inc/AdalFlow",
      "asOf": "2026-11-20"
    },
    "F258": {
      "label": "Project stargazers_count, dspy",
      "display": "4.2K",
      "asOf": "2026-11-20"
    },
    "F259": {
      "label": "Library name, llama-index-core",
      "display": "LlamaIndex Core",
      "asOf": "2026-11-20"
    },
    "F260": {
      "label": "Monthly downloads, llama-index-core",
      "display": "5.7M",
      "asOf": "2026-11-20"
    },
    "F261": {
      "label": "License, llama-index-core",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F262": {
      "label": "Package release, llama-index-core",
      "display": "0.14.26",
      "asOf": "2026-11-20"
    },
    "F263": {
      "label": "Package release date, llama-index-core",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F264": {
      "label": "Install, llama-index-core",
      "display": "pip install llama-index",
      "asOf": "2026-11-20"
    },
    "F265": {
      "label": "Quickstart, llama-index-core",
      "display": "import os\n\nos.environ[\"OPENAI_API_KEY\"] = \"YOUR_OPENAI_API_KEY\"\n\nfrom llama_index.core import VectorStoreIndex, SimpleDirectoryReader\n\ndocuments = SimpleDirectoryReader(\"YOUR_DATA_DIRECTORY\").load_data()\nindex = VectorStoreIndex.from_documents(documents)\n\nquery_engine = index.as_query_engine()\nquery_engine.query(\"YOUR_QUESTION\")\n",
      "asOf": "2026-11-20"
    },
    "F266": {
      "label": "Repository stars, llama-index-core",
      "display": "52.9K",
      "asOf": "2026-11-20"
    },
    "F267": {
      "label": "File/corpus loading API, llama-index-core",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F268": {
      "label": "In-process corpus index, llama-index-core",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F269": {
      "label": "Native RAG role and backend, llama-index-core",
      "display": "Index/retriever/query-engine framework with local document loading and optional remote model/vector-store integrations. The starter bundle includes core and separate integration packages.",
      "asOf": "2026-11-20"
    },
    "F270": {
      "label": "First-call prerequisites, llama-index-core",
      "display": "Two whole unchanged own README blocks: declared reader/documents/index plus its native query engine workflow. Explicit assembly needs source-form review. The own install guide starter bundle includes core, OpenAI model/embedding and file-reader packages; metrics remain core distribution, not the bundle. Requires replacing public demo key/data-directory/question placeholders and reviewing current default model availability. No key/environment, reader, file access, model or query ran.",
      "asOf": "2026-11-20"
    },
    "F271": {
      "label": "Original project function contract, llama-index-core",
      "display": "VectorStoreIndex.as_query_engine(streaming=True) creates a streaming query engine; query receives the user string. No unsupported stream flag is invented on query itself. The supplied LLM integration must implement streaming; this is not asserted for every provider.",
      "asOf": "2026-11-20"
    },
    "F272": {
      "label": "Project function, llama-index-core",
      "display": "def pipe(\n    self, user_message: str, model_id: str, messages: List[dict], body: dict\n) -> Union[str, Generator, Iterator]:\n    # This is where you can add your custom RAG pipeline.\n    # Typically, you would retrieve relevant information from your knowledge base and synthesize it to generate a response.\n\n    print(messages)\n    print(user_message)\n\n    query_engine = self.index.as_query_engine(streaming=True)\n    response = query_engine.query(user_message)\n\n    return response.response_gen",
      "asOf": "2026-11-20"
    },
    "F273": {
      "label": "Project source file, llama-index-core",
      "display": "examples/pipelines/rag/llamaindex_ollama_pipeline.py",
      "asOf": "2026-11-20"
    },
    "F274": {
      "label": "Project full_name, llama-index-core",
      "display": "open-webui/pipelines",
      "asOf": "2026-11-20"
    },
    "F275": {
      "label": "Project stargazers_count, llama-index-core",
      "display": "2.4K",
      "asOf": "2026-11-20"
    },
    "F276": {
      "label": "Developer need, bedrock",
      "display": "Documents already on AWS",
      "asOf": "2026-11-17"
    },
    "F277": {
      "label": "Pick reason, bedrock",
      "display": "queries a Bedrock knowledge base and generates a cited answer",
      "asOf": "2026-11-17"
    },
    "F278": {
      "label": "Developer need, openai",
      "display": "Search over files in OpenAI",
      "asOf": "2026-11-17"
    },
    "F279": {
      "label": "Pick reason, openai",
      "display": "searches uploaded files with semantic and keyword search",
      "asOf": "2026-11-17"
    },
    "F280": {
      "label": "Developer need, gemini",
      "display": "Search over files in Gemini",
      "asOf": "2026-11-17"
    },
    "F281": {
      "label": "Pick reason, gemini",
      "display": "imports, chunks, and indexes files in a hosted store",
      "asOf": "2026-11-17"
    },
    "F282": {
      "label": "Developer need, langchain classic",
      "display": "An existing LangChain retrieval chain",
      "asOf": "2026-11-17"
    },
    "F283": {
      "label": "Pick reason, langchain classic",
      "display": "joins a retriever with a document-combining chain",
      "asOf": "2026-11-17"
    },
    "F284": {
      "label": "Developer need, adk",
      "display": "Retrieval inside an ADK agent",
      "asOf": "2026-11-17"
    },
    "F285": {
      "label": "Pick reason, adk",
      "display": "attaches Vertex AI RAG retrieval to an agent as a tool",
      "asOf": "2026-11-17"
    },
    "F286": {
      "label": "Developer need, azure",
      "display": "Files kept in the project's own storage",
      "asOf": "2026-11-17"
    },
    "F287": {
      "label": "Pick reason, azure",
      "display": "grounds Foundry agents in files kept in the project's storage",
      "asOf": "2026-11-17"
    },
    "F288": {
      "label": "Developer need, dspy",
      "display": "A RAG program tuned on examples",
      "asOf": "2026-11-17"
    },
    "F289": {
      "label": "Pick reason, dspy",
      "display": "composes a retriever and answer module that optimizers tune",
      "asOf": "2026-11-17"
    },
    "F290": {
      "label": "Strength, bedrock",
      "display": "Cited answers",
      "asOf": "2026-11-17"
    },
    "F291": {
      "label": "Strength body, bedrock",
      "display": "retrieve_and_generate retrieves from the knowledge base and answers with a chosen foundation model.",
      "asOf": "2026-11-17"
    },
    "F292": {
      "label": "Strength, openai",
      "display": "Hosted file search",
      "asOf": "2026-11-17"
    },
    "F293": {
      "label": "Strength body, openai",
      "display": "OpenAI stores, chunks, and searches the files, and the model calls the tool when needed.",
      "asOf": "2026-11-17"
    },
    "F294": {
      "label": "Strength, gemini",
      "display": "Indexing handled by the API",
      "asOf": "2026-11-17"
    },
    "F295": {
      "label": "Strength body, gemini",
      "display": "The File Search store imports, chunks, and indexes files without a separate vector database.",
      "asOf": "2026-11-17"
    },
    "F296": {
      "label": "Strength, langchain classic",
      "display": "One-call retrieval chain",
      "asOf": "2026-11-17"
    },
    "F297": {
      "label": "Strength body, langchain classic",
      "display": "create_retrieval_chain joins any LangChain retriever with a chain that answers from the documents.",
      "asOf": "2026-11-17"
    },
    "F298": {
      "label": "Strength, adk",
      "display": "Retrieval as an agent tool",
      "asOf": "2026-11-17"
    },
    "F299": {
      "label": "Strength body, adk",
      "display": "VertexAiRagRetrieval exposes a Vertex AI RAG corpus to an agent as a callable tool.",
      "asOf": "2026-11-17"
    },
    "F300": {
      "label": "Strength, azure",
      "display": "Files stay in project storage",
      "asOf": "2026-11-17"
    },
    "F301": {
      "label": "Strength body, azure",
      "display": "With the standard agent setup, uploaded files remain in the project's own storage.",
      "asOf": "2026-11-17"
    },
    "F302": {
      "label": "Strength, dspy",
      "display": "Retriever as a module",
      "asOf": "2026-11-17"
    },
    "F303": {
      "label": "Strength body, dspy",
      "display": "dspy.retrievers.Embeddings searches an in-memory corpus with any configured embedder.",
      "asOf": "2026-11-17"
    }
  },
  "dataCheckedAt": "2026-11-20",
  "agent": {
    "exaCall": {
      "endpoint": "/search",
      "body": {
        "query": "Best Python RAG libraries LlamaIndex Haystack txtai LightRAG code examples",
        "numResults": 5
      },
      "docsUrl": "https://exa.ai/docs/reference/search"
    },
    "calls": []
  }
}
