CoolFace
Apppublic

soumya-ai/Knowledge-Graph-Ingest

sourceHugging Facemitupdated 4mo agoView on Hugging Face
0likes
sample_corpus.py72 linesDownload Raw Back to src
1"""Default sample documents for ingestion demos."""2 3from langchain_core.documents import Document4 5SAMPLE_DOCUMENTS: list[Document] = [6    Document(7        page_content="""8        OpenAI is an AI research company founded in 2015 by Sam Altman, Greg Brockman,9        Ilya Sutskever, Elon Musk, and others. OpenAI developed GPT-4, one of the most10        powerful large language models available. GPT-4 is used in ChatGPT, a conversational11        AI product released in 2022. OpenAI is headquartered in San Francisco.12        Microsoft has made significant investments in OpenAI, contributing over $13 billion.13        This partnership allows Microsoft to integrate OpenAI models into Azure and Bing.14        """,15        metadata={"source": "openai_overview"},16    ),17    Document(18        page_content="""19        Anthropic is an AI safety company founded in 2021 by Dario Amodei and Daniela Amodei,20        who previously worked at OpenAI. Anthropic created Claude, a family of large language21        models known for safety and helpfulness. Claude is available through the Claude.ai interface22        and the Anthropic API. Anthropic has received investments from Google and Amazon.23        The company is focused on AI alignment research and interpretability.24        """,25        metadata={"source": "anthropic_overview"},26    ),27    Document(28        page_content="""29        LangChain is an open-source framework for building applications with large language models.30        It was created by Harrison Chase in 2022. LangChain provides abstractions for chains,31        agents, memory, and retrieval-augmented generation (RAG). LangChain Expression Language (LCEL)32        is the modern declarative way to compose LangChain components into pipelines using the pipe33        operator. LangChain integrates with Neo4j, OpenAI, Ollama, and many other tools.34        """,35        metadata={"source": "langchain_overview"},36    ),37    Document(38        page_content="""39        Neo4j is a graph database management system developed by Neo4j Inc, founded in 2007.40        It uses the Cypher query language for graph traversal and manipulation.41        Neo4j supports APOC (Awesome Procedures on Cypher) as a plugin for extended functionality.42        The Graph Data Science (GDS) library enables graph algorithms like PageRank, community detection,43        and similarity measures directly inside Neo4j. Neo4j is widely used for knowledge graphs,44        fraud detection, recommendation systems, and GraphRAG applications.45        """,46        metadata={"source": "neo4j_overview"},47    ),48    Document(49        page_content="""50        Retrieval-Augmented Generation (RAG) is a technique that combines a retrieval system51        with a generative language model. Standard RAG uses vector similarity search to find52        relevant text chunks, which are then passed as context to an LLM. GraphRAG extends this53        by using a knowledge graph for retrieval, enabling multi-hop reasoning across connected54        entities. GraphRAG was popularized by Microsoft Research in 2024. It is particularly55        effective for complex questions that require understanding relationships between concepts,56        such as "how does drug A interact with enzyme B to affect disease C".57        """,58        metadata={"source": "rag_overview"},59    ),60    Document(61        page_content="""62        Ollama is an open-source tool that allows running large language models locally on your63        machine. It supports models including Mistral, LLaMA 3, Phi-3, Gemma, and CodeLlama.64        Ollama provides an OpenAI-compatible API endpoint at localhost:11434, making it easy65        to integrate with LangChain and other frameworks. The nomic-embed-text model is available66        in Ollama and produces 768-dimensional embeddings suitable for semantic search.67        Ollama is popular for privacy-sensitive applications and offline environments.68        """,69        metadata={"source": "ollama_overview"},70    ),71]72