@yukincom

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

GraphRAG実験〜数値相談〜

Entity Linking 閾値で少し迷ってまして・・・。
今、こんな感じの結果で。

スクリーンショット 2025-12-04 18.07.05.png

パラメータはこう言う感じで・・・
Entity Linking0.88だと別ノード化 → パス切れの原因になるので、0.91くらいの方がいいのかなと思いつつ、多言語意識すると、0.88くらいの方が安全かなと思いますし・・・。

'entity_linking_threshold': 0.88,
'retrieval_chunk_size': 320,      # ← 512 → 320
'retrieval_chunk_overlap': 120,   # ← 100 → 120
'graph_chunk_size': 512,
'graph_chunk_overlap': 50,
'relation_compat_threshold': 0.11,  # ← 0.08 → 0.11
'final_weight_cutoff': 0.035,      # ← 0.02 → 0.035
'max_triplets_per_chunk': 15,
'llm_model': 'gpt-4o-mini',
'llm_timeout': 120.0

本番はClaudeSonnetの予定なので、また微妙に結果の数値が変わる可能性はありますが・・。

テスト用のJsonはこんなくらいのボリュームです。

{
  "documents": [
    {
  "text": "Deep learning is a subset of machine learning that uses artificial neural networks with multiple layers. These neural networks are inspired by the structure and function of the human brain. Deep learning has revolutionized computer vision, enabling systems to recognize objects, faces, and scenes with high accuracy. Convolutional Neural Networks (CNNs) are particularly effective for image processing tasks. CNNs use multiple layers of filters to extract features from images, starting with simple edges and progressing to complex patterns. The breakthrough came in 2012 when AlexNet won the ImageNet competition, demonstrating that deep neural networks could outperform traditional computer vision methods. Since then, deep learning has been applied to natural language processing, speech recognition, and autonomous vehicles. ResNet, developed by Microsoft Research, introduced skip connections that allow training of very deep networks with over 100 layers. Google's Inception architecture uses parallel convolutions with different filter sizes to capture features at multiple scales.",
  "metadata": {
    "title": "Deep Learning and Computer Vision",
    "category": "AI/ML",
    "year": 2023,
    "keywords": ["deep learning", "neural networks", "computer vision", "CNN"]
  }
},
{
  "text": "Natural Language Processing (NLP) has been transformed by the introduction of transformer architectures. The transformer model, introduced in the paper 'Attention Is All You Need' by Vaswani et al., uses self-attention mechanisms to process sequential data. Unlike recurrent neural networks (RNNs), transformers can process all tokens in parallel, making them much faster to train. BERT (Bidirectional Encoder Representations from Transformers), developed by Google, uses masked language modeling to learn contextualized word representations. GPT (Generative Pre-trained Transformer) models, created by OpenAI, use autoregressive language modeling to generate coherent text. These models are pre-trained on large corpora and then fine-tuned for specific tasks like question answering, text summarization, and machine translation. The attention mechanism allows the model to focus on relevant parts of the input when making predictions. Large Language Models (LLMs) like GPT-4 and Claude have demonstrated remarkable capabilities in understanding and generating human-like text.",
  "metadata": {
    "title": "Transformers and Natural Language Processing",
    "category": "AI/ML",
    "year": 2023,
    "keywords": ["NLP", "transformers", "BERT", "GPT", "attention mechanism"]
  }
},
{
  "text": "Knowledge graphs represent information as networks of entities and their relationships. Neo4j is a popular graph database that stores data as nodes and edges, where nodes represent entities and edges represent relationships. Knowledge graphs are used in semantic search, recommendation systems, and question answering. Google's Knowledge Graph powers search results by understanding the relationships between concepts. DBpedia extracts structured information from Wikipedia and represents it as a knowledge graph with millions of entities. Wikidata is a collaboratively edited knowledge base that serves as structured data storage for Wikimedia projects. Graph Neural Networks (GNNs) can learn representations of nodes and edges in knowledge graphs, enabling tasks like link prediction and node classification. The Resource Description Framework (RDF) is a standard for representing knowledge graphs using subject-predicate-object triples. SPARQL is a query language for RDF databases, similar to SQL for relational databases. Knowledge graph embeddings like TransE and ComplEx learn vector representations of entities and relations.",
  "metadata": {
    "title": "Knowledge Graphs and Graph Databases",
    "category": "Database",
    "year": 2023,
    "keywords": ["knowledge graph", "Neo4j", "graph database", "RDF", "GNN"]
  }
},
{
  "text": "Retrieval-Augmented Generation (RAG) combines information retrieval with language generation to produce more accurate and factual responses. RAG systems first retrieve relevant documents from a knowledge base using semantic search, then use a language model to generate responses based on the retrieved context. Vector databases like Pinecone, Weaviate, and Chroma store document embeddings for efficient similarity search. These embeddings are created using models like BERT, Sentence-BERT, or OpenAI's text-embedding models. Dense retrieval methods outperform traditional keyword-based search by capturing semantic similarity. The retrieval component can use various techniques including BM25, dense passage retrieval (DPR), or hybrid approaches. LlamaIndex and LangChain are frameworks that simplify building RAG applications by providing abstractions for document loading, indexing, and querying. RAG helps reduce hallucinations in language models by grounding responses in retrieved facts. Multi-hop reasoning in RAG systems can answer complex questions that require information from multiple documents.",
  "metadata": {
    "title": "Retrieval-Augmented Generation and Vector Search",
    "category": "AI/ML",
    "year": 2023,
    "keywords": ["RAG", "vector database", "embeddings", "semantic search", "LlamaIndex"]
  }
},
{
  "text": "Graph Retrieval-Augmented Generation (Graph RAG) extends traditional RAG by incorporating knowledge graphs into the retrieval process. Instead of retrieving only text documents, Graph RAG can traverse graph structures to find related entities and relationships. This approach is particularly effective for multi-hop reasoning and answering complex questions that require understanding connections between multiple entities. Graph RAG systems can combine vector similarity search with graph traversal algorithms like breadth-first search or shortest path finding. Neo4j can be integrated with LlamaIndex to build Graph RAG applications that leverage both graph structure and semantic embeddings. Entity linking connects mentions in text to nodes in the knowledge graph, enabling more precise retrieval. Graph attention mechanisms can weight the importance of different paths in the knowledge graph when generating responses. Subgraph extraction techniques identify relevant portions of large knowledge graphs for specific queries.",
  "metadata": {
    "title": "Graph RAG and Knowledge Graph Integration",
    "category": "AI/ML",
    "year": 2024,
    "keywords": ["Graph RAG", "knowledge graph", "multi-hop reasoning", "Neo4j", "entity linking"]
  }
},
{
  "text": "Machine learning model training requires large datasets and significant computational resources. GPUs (Graphics Processing Units) accelerate training by performing matrix operations in parallel. NVIDIA's CUDA framework enables developers to write GPU-accelerated code. TPUs (Tensor Processing Units), developed by Google, are specialized hardware designed specifically for tensor operations in neural networks. Distributed training across multiple GPUs or machines uses techniques like data parallelism and model parallelism. Mixed precision training uses both 16-bit and 32-bit floating-point numbers to speed up training while maintaining model accuracy. Gradient accumulation allows training with larger effective batch sizes on limited hardware. PyTorch and TensorFlow are popular deep learning frameworks that provide automatic differentiation and GPU support. Hyperparameter tuning using grid search, random search, or Bayesian optimization is crucial for achieving optimal model performance. Transfer learning allows models pre-trained on large datasets to be fine-tuned for specific tasks with less data.",
  "metadata": {
    "title": "Machine Learning Infrastructure and Training",
    "category": "AI/ML",
    "year": 2023,
    "keywords": ["GPU", "TPU", "distributed training", "PyTorch", "transfer learning"]
      }
    }
  ]
}
0 likes

Your answer might help someone💌