├── .github ├── ISSUE_TEMPLATE │ ├── 🐞-bug-report.md │ └── 💡-feature-request.md └── workflows │ ├── publish.yml │ └── python-package.yml ├── .gitignore ├── .vscode └── settings.json ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── banner.png ├── benchmarks ├── README.md ├── _domain.py ├── create_db.bat ├── create_dbs.bat ├── create_dbs.sh ├── datasets │ └── 2wikimultihopqa.json ├── db │ └── .gitignore ├── evaluate_dbs.bat ├── evaluate_dbs.sh ├── graph_benchmark.py ├── lightrag_benchmark.py ├── nano_benchmark.py ├── questions │ ├── 2wikimultihopqa_101.json │ └── 2wikimultihopqa_51.json ├── results │ ├── graph │ │ ├── 2wikimultihopqa_101.json │ │ └── 2wikimultihopqa_51.json │ ├── lightrag │ │ ├── 2wikimultihopqa_101_local.json │ │ └── 2wikimultihopqa_51_local.json │ ├── nano │ │ ├── 2wikimultihopqa_101_local.json │ │ └── 2wikimultihopqa_51_local.json │ └── vdb │ │ ├── 2wikimultihopqa_101.json │ │ └── 2wikimultihopqa_51.json └── vdb_benchmark.py ├── demo.gif ├── examples ├── checkpointing.ipynb ├── custom_llm.py ├── gemini_example.py ├── gemini_vertexai_llm.py └── query_parameters.ipynb ├── fast_graphrag ├── __init__.py ├── _exceptions.py ├── _graphrag.py ├── _llm │ ├── __init__.py │ ├── _base.py │ ├── _default.py │ ├── _llm_genai.py │ ├── _llm_openai.py │ └── _llm_voyage.py ├── _models.py ├── _policies │ ├── __init__.py │ ├── _base.py │ ├── _graph_upsert.py │ └── _ranking.py ├── _prompt.py ├── _services │ ├── __init__.py │ ├── _base.py │ ├── _chunk_extraction.py │ ├── _information_extraction.py │ └── _state_manager.py ├── _storage │ ├── __init__.py │ ├── _base.py │ ├── _blob_pickle.py │ ├── _default.py │ ├── _gdb_igraph.py │ ├── _ikv_pickle.py │ ├── _namespace.py │ └── _vdb_hnswlib.py ├── _types.py └── _utils.py ├── mock_data.txt ├── poetry.lock ├── pyproject.toml └── tests ├── __init__.py ├── _graphrag_test.py ├── _llm ├── __init__.py ├── _base_test.py └── _llm_openai_test.py ├── _models_test.py ├── _policies ├── __init__.py ├── _graph_upsert_test.py └── _ranking_test.py ├── _services ├── __init__.py ├── _chunk_extraction_test.py └── _information_extraction_test.py ├── _storage ├── __init__.py ├── _base_test.py ├── _blob_pickle_test.py ├── _gdb_igraph_test.py ├── _ikv_pickle_test.py ├── _namespace_test.py └── _vdb_hnswlib_test.py ├── _types_test.py └── _utils_test.py /.github/ISSUE_TEMPLATE/🐞-bug-report.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/.github/ISSUE_TEMPLATE/🐞-bug-report.md -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/💡-feature-request.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/.github/ISSUE_TEMPLATE/💡-feature-request.md -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/.github/workflows/publish.yml -------------------------------------------------------------------------------- /.github/workflows/python-package.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/.github/workflows/python-package.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/.gitignore -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/.vscode/settings.json -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/CODE_OF_CONDUCT.md -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/CONTRIBUTING.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/README.md -------------------------------------------------------------------------------- /banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/banner.png -------------------------------------------------------------------------------- /benchmarks/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/benchmarks/README.md -------------------------------------------------------------------------------- /benchmarks/_domain.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/benchmarks/_domain.py -------------------------------------------------------------------------------- /benchmarks/create_db.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/benchmarks/create_db.bat -------------------------------------------------------------------------------- /benchmarks/create_dbs.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/benchmarks/create_dbs.bat -------------------------------------------------------------------------------- /benchmarks/create_dbs.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/benchmarks/create_dbs.sh -------------------------------------------------------------------------------- /benchmarks/datasets/2wikimultihopqa.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/benchmarks/datasets/2wikimultihopqa.json -------------------------------------------------------------------------------- /benchmarks/db/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /benchmarks/evaluate_dbs.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/benchmarks/evaluate_dbs.bat -------------------------------------------------------------------------------- /benchmarks/evaluate_dbs.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/benchmarks/evaluate_dbs.sh -------------------------------------------------------------------------------- /benchmarks/graph_benchmark.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/benchmarks/graph_benchmark.py -------------------------------------------------------------------------------- /benchmarks/lightrag_benchmark.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/benchmarks/lightrag_benchmark.py -------------------------------------------------------------------------------- /benchmarks/nano_benchmark.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/benchmarks/nano_benchmark.py -------------------------------------------------------------------------------- /benchmarks/questions/2wikimultihopqa_101.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/benchmarks/questions/2wikimultihopqa_101.json -------------------------------------------------------------------------------- /benchmarks/questions/2wikimultihopqa_51.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/benchmarks/questions/2wikimultihopqa_51.json -------------------------------------------------------------------------------- /benchmarks/results/graph/2wikimultihopqa_101.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/benchmarks/results/graph/2wikimultihopqa_101.json -------------------------------------------------------------------------------- /benchmarks/results/graph/2wikimultihopqa_51.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/benchmarks/results/graph/2wikimultihopqa_51.json -------------------------------------------------------------------------------- /benchmarks/results/lightrag/2wikimultihopqa_101_local.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/benchmarks/results/lightrag/2wikimultihopqa_101_local.json -------------------------------------------------------------------------------- /benchmarks/results/lightrag/2wikimultihopqa_51_local.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/benchmarks/results/lightrag/2wikimultihopqa_51_local.json -------------------------------------------------------------------------------- /benchmarks/results/nano/2wikimultihopqa_101_local.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/benchmarks/results/nano/2wikimultihopqa_101_local.json -------------------------------------------------------------------------------- /benchmarks/results/nano/2wikimultihopqa_51_local.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/benchmarks/results/nano/2wikimultihopqa_51_local.json -------------------------------------------------------------------------------- /benchmarks/results/vdb/2wikimultihopqa_101.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/benchmarks/results/vdb/2wikimultihopqa_101.json -------------------------------------------------------------------------------- /benchmarks/results/vdb/2wikimultihopqa_51.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/benchmarks/results/vdb/2wikimultihopqa_51.json -------------------------------------------------------------------------------- /benchmarks/vdb_benchmark.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/benchmarks/vdb_benchmark.py -------------------------------------------------------------------------------- /demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/demo.gif -------------------------------------------------------------------------------- /examples/checkpointing.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/examples/checkpointing.ipynb -------------------------------------------------------------------------------- /examples/custom_llm.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/examples/custom_llm.py -------------------------------------------------------------------------------- /examples/gemini_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/examples/gemini_example.py -------------------------------------------------------------------------------- /examples/gemini_vertexai_llm.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/examples/gemini_vertexai_llm.py -------------------------------------------------------------------------------- /examples/query_parameters.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/examples/query_parameters.ipynb -------------------------------------------------------------------------------- /fast_graphrag/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/fast_graphrag/__init__.py -------------------------------------------------------------------------------- /fast_graphrag/_exceptions.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/fast_graphrag/_exceptions.py -------------------------------------------------------------------------------- /fast_graphrag/_graphrag.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/fast_graphrag/_graphrag.py -------------------------------------------------------------------------------- /fast_graphrag/_llm/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/fast_graphrag/_llm/__init__.py -------------------------------------------------------------------------------- /fast_graphrag/_llm/_base.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/fast_graphrag/_llm/_base.py -------------------------------------------------------------------------------- /fast_graphrag/_llm/_default.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/fast_graphrag/_llm/_default.py -------------------------------------------------------------------------------- /fast_graphrag/_llm/_llm_genai.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/fast_graphrag/_llm/_llm_genai.py -------------------------------------------------------------------------------- /fast_graphrag/_llm/_llm_openai.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/fast_graphrag/_llm/_llm_openai.py -------------------------------------------------------------------------------- /fast_graphrag/_llm/_llm_voyage.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/fast_graphrag/_llm/_llm_voyage.py -------------------------------------------------------------------------------- /fast_graphrag/_models.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/fast_graphrag/_models.py -------------------------------------------------------------------------------- /fast_graphrag/_policies/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fast_graphrag/_policies/_base.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/fast_graphrag/_policies/_base.py -------------------------------------------------------------------------------- /fast_graphrag/_policies/_graph_upsert.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/fast_graphrag/_policies/_graph_upsert.py -------------------------------------------------------------------------------- /fast_graphrag/_policies/_ranking.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/fast_graphrag/_policies/_ranking.py -------------------------------------------------------------------------------- /fast_graphrag/_prompt.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/fast_graphrag/_prompt.py -------------------------------------------------------------------------------- /fast_graphrag/_services/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/fast_graphrag/_services/__init__.py -------------------------------------------------------------------------------- /fast_graphrag/_services/_base.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/fast_graphrag/_services/_base.py -------------------------------------------------------------------------------- /fast_graphrag/_services/_chunk_extraction.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/fast_graphrag/_services/_chunk_extraction.py -------------------------------------------------------------------------------- /fast_graphrag/_services/_information_extraction.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/fast_graphrag/_services/_information_extraction.py -------------------------------------------------------------------------------- /fast_graphrag/_services/_state_manager.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/fast_graphrag/_services/_state_manager.py -------------------------------------------------------------------------------- /fast_graphrag/_storage/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/fast_graphrag/_storage/__init__.py -------------------------------------------------------------------------------- /fast_graphrag/_storage/_base.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/fast_graphrag/_storage/_base.py -------------------------------------------------------------------------------- /fast_graphrag/_storage/_blob_pickle.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/fast_graphrag/_storage/_blob_pickle.py -------------------------------------------------------------------------------- /fast_graphrag/_storage/_default.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/fast_graphrag/_storage/_default.py -------------------------------------------------------------------------------- /fast_graphrag/_storage/_gdb_igraph.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/fast_graphrag/_storage/_gdb_igraph.py -------------------------------------------------------------------------------- /fast_graphrag/_storage/_ikv_pickle.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/fast_graphrag/_storage/_ikv_pickle.py -------------------------------------------------------------------------------- /fast_graphrag/_storage/_namespace.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/fast_graphrag/_storage/_namespace.py -------------------------------------------------------------------------------- /fast_graphrag/_storage/_vdb_hnswlib.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/fast_graphrag/_storage/_vdb_hnswlib.py -------------------------------------------------------------------------------- /fast_graphrag/_types.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/fast_graphrag/_types.py -------------------------------------------------------------------------------- /fast_graphrag/_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/fast_graphrag/_utils.py -------------------------------------------------------------------------------- /mock_data.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/mock_data.txt -------------------------------------------------------------------------------- /poetry.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/poetry.lock -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/pyproject.toml -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | """Testing.""" 2 | -------------------------------------------------------------------------------- /tests/_graphrag_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/tests/_graphrag_test.py -------------------------------------------------------------------------------- /tests/_llm/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/_llm/_base_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/tests/_llm/_base_test.py -------------------------------------------------------------------------------- /tests/_llm/_llm_openai_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/tests/_llm/_llm_openai_test.py -------------------------------------------------------------------------------- /tests/_models_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/tests/_models_test.py -------------------------------------------------------------------------------- /tests/_policies/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/_policies/_graph_upsert_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/tests/_policies/_graph_upsert_test.py -------------------------------------------------------------------------------- /tests/_policies/_ranking_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/tests/_policies/_ranking_test.py -------------------------------------------------------------------------------- /tests/_services/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/_services/_chunk_extraction_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/tests/_services/_chunk_extraction_test.py -------------------------------------------------------------------------------- /tests/_services/_information_extraction_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/tests/_services/_information_extraction_test.py -------------------------------------------------------------------------------- /tests/_storage/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/_storage/_base_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/tests/_storage/_base_test.py -------------------------------------------------------------------------------- /tests/_storage/_blob_pickle_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/tests/_storage/_blob_pickle_test.py -------------------------------------------------------------------------------- /tests/_storage/_gdb_igraph_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/tests/_storage/_gdb_igraph_test.py -------------------------------------------------------------------------------- /tests/_storage/_ikv_pickle_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/tests/_storage/_ikv_pickle_test.py -------------------------------------------------------------------------------- /tests/_storage/_namespace_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/tests/_storage/_namespace_test.py -------------------------------------------------------------------------------- /tests/_storage/_vdb_hnswlib_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/tests/_storage/_vdb_hnswlib_test.py -------------------------------------------------------------------------------- /tests/_types_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/tests/_types_test.py -------------------------------------------------------------------------------- /tests/_utils_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/circlemind-ai/fast-graphrag/HEAD/tests/_utils_test.py --------------------------------------------------------------------------------