MCTS based PageIndex search library
Project description
PageIndexMCTS
PageIndexMCTS is a Python library that implements Monte Carlo Tree Search (MCTS) for efficient page indexing and retrieval, integrated with Large Language Models (LLMs).
Features
- MCTS Implementation: Includes standard MCTS and Hybrid MCTS (PUCT) algorithms.
- LLM Integration: Supports using LLMs (like ChatGPT) for value estimation and policy priors.
- Parallel Search: Optimized for performance with parallel simulation steps.
- Document Indexing: Tools for indexing PDF and Markdown documents.
Installation
You can install the package directly from source:
pip install .
Usage
See the example directory for usage demonstrations.
Basic MCTS Search
from search.tree.mcts import PageIndexMCTS
# Initialize your structure and query
# ...
search = PageIndexMCTS(structure, query, use_llm=True, n_threads=4)
search.run_search(iterations=50)
results = search.get_top_results(n=3)
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pageindex_mcts-0.1.0.tar.gz.
File metadata
- Download URL: pageindex_mcts-0.1.0.tar.gz
- Upload date:
- Size: 43.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b22637d81b8a160cab4c6f3e2c26459f6a557c8505aeff2128228140b2dc929
|
|
| MD5 |
c2c9c1f97da9167a03c66eba65fa231c
|
|
| BLAKE2b-256 |
ab72f375f0b2eda11de5b0486061c89ffb61b6ef1b2630b6afecc97f7f4618cd
|
File details
Details for the file pageindex_mcts-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pageindex_mcts-0.1.0-py3-none-any.whl
- Upload date:
- Size: 44.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44cd9e47f6f98dc3aa26ac86da04489b4d767dcef92fb8a61e0498526d1422fd
|
|
| MD5 |
b421fa6b4284bc738c3bdbca57bed6d4
|
|
| BLAKE2b-256 |
5c274856a56a2434dbd5a7ea6d65d984a755dfc6b3f55d751e1db2ab399e4738
|