Commit Graph

528 Commits

Author SHA1 Message Date
Roy
e31c0c8f6c Update vector query methods to support ID filtering in PostgreSQL
- Modified `mix_kg_vector_query` in operate.py to pass optional IDs to vector search
- Updated PostgreSQL SQL template to filter results using document IDs instead of chunk_id
- Improved query flexibility by allowing precise document selection during vector search
2025-03-08 20:25:20 +00:00
yangdx
c5d0962872 Fix linting 2025-03-09 01:00:42 +08:00
zrguo
da59cc89d8 fix linting 2025-03-09 00:51:14 +08:00
zrguo
376b63b704 Merge pull request #1027 from dixyes/fix-qdrant-payload-id
Fix qdrant payload id
2025-03-09 00:28:17 +08:00
yangdx
18c0770409 fix: duplicate nodes for same entity(label) problem in Neo4j
- Add entity_id field as key in Neo4j nodes
- Use  entity_id for nodes retrival and upsert
2025-03-09 00:24:55 +08:00
Roy
528fb11364 Refactor vector query methods to support optional ID filtering
- Updated BaseVectorStorage query method signature to accept optional IDs
- Modified operate.py to pass query parameter IDs to vector storage queries
- Updated PostgreSQL vector storage SQL templates to filter results by document IDs
- Removed unused parameters and simplified query logic across multiple files
2025-03-08 15:43:17 +00:00
yangdx
95c06f1bde Add graph DB lock to shared storage system
• Introduced new graph_db_lock
• Added detailed lock debugging output
2025-03-08 22:36:41 +08:00
dixyes
458eafd714 Fix qdrant payload id
Qdrant now is using PointStruct.payload["id"], not PointStruct.id UUID.
This will fix id overwrite
2025-03-08 16:40:40 +08:00
Samuel Chan
b7f67eda21 fix the postgres get all labels and get knowledge graph 2025-03-08 11:45:59 +08:00
yangdx
fb4a4c736e Add duplicate edge upsert checking and logging 2025-03-08 11:36:24 +08:00
yangdx
22a93fb717 Limit neighbor nodes fetch to 1000 in Neo4JStorage. 2025-03-08 11:29:08 +08:00
yangdx
887f6ed81a Fix return empty list when no edges is found 2025-03-08 11:20:22 +08:00
yangdx
af26d65698 Convert _ensure_label method from async to sync 2025-03-08 10:23:27 +08:00
yangdx
78f8d7a1ce Convert node and edge IDs to f-strings for consistency.
- Use f-strings for node IDs
- Use f-strings for edge IDs
- Ensure consistent ID formatting
2025-03-08 10:20:10 +08:00
yangdx
84222b8b76 Refactor Neo4JStorage methods for robustness and clarity.
- Add error handling and resource cleanup
- Improve method documentation
- Optimize result consumption
2025-03-08 10:19:20 +08:00
yangdx
fcb04e47e5 Refactor Neo4J APOC fall back retrival implementaion 2025-03-08 04:28:54 +08:00
Roy
bbe139cfeb Enhance PostgreSQL vector storage with chunk_id support
- Updated SQL templates for entity and relationship upsert to include chunk_id
- Modified PGVectorStorage methods to add chunk_id when inserting or updating records
- Expanded database schema to track chunk-level metadata
2025-03-07 20:18:01 +00:00
Roy
0ec61d6407 Update project dependencies and example test files
- Updated requirements.txt with latest package versions
- Added support for filtering query results by IDs in base and operate modules
- Modified PostgreSQL vector storage to include document and chunk ID fields
2025-03-07 18:45:28 +00:00
yangdx
c07b592e1b Add missing await consume 2025-03-08 02:39:51 +08:00
yangdx
af803f4e7a Refactor Neo4J graph query with min_degree an inclusive match support 2025-03-08 01:20:36 +08:00
yangdx
0ee2e7fd48 Suppress Neo4j warning logs by setting logger level. 2025-03-07 16:56:48 +08:00
yangdx
6e3b23069c - Remove useless _label_exists method 2025-03-07 16:43:18 +08:00
zrguo
e822f35c89 Fix edit entity and relation bugs 2025-03-07 14:39:06 +08:00
yangdx
6d5c04d561 Reduce max_depth and update edge type in NetworkXStorage.
- Decreased max_depth from 5 to 3
- Changed edge type from "RELATED" to "DIRECTED"
2025-03-06 20:54:02 +08:00
yangdx
5b29e760f0 Add dynamic parameter handling for storage 2025-03-06 14:29:48 +08:00
yangdx
252d1f57e0 Merge branch 'main' into add-graph-search-mode 2025-03-06 10:23:38 +08:00
yangdx
0ca7c0e230 Fix linting 2025-03-05 15:07:11 +08:00
yangdx
4e2a9b1994 Apply min_degree filter for full graph query 2025-03-05 13:21:17 +08:00
yangdx
ca9e958cad Fix subgraph filtering bugs 2025-03-05 13:13:46 +08:00
yangdx
5f12aa3ee4 Fix linting 2025-03-05 12:32:23 +08:00
yangdx
5e40e4107d Added min_degree exception for connected nodes 2025-03-05 11:48:04 +08:00
yangdx
1fddc8552e Added minimum degree filter for graph queries
- Introduced min_degree parameter in graph query
- Updated UI to include minimum degree setting
- Modified API to handle min_degree parameter
- Updated graph query logic in LightRAG
2025-03-05 11:37:55 +08:00
zrguo
1ee6c23a53 fix linting 2025-03-04 16:12:27 +08:00
zrguo
4ebaf8026b Update oracle_impl.py 2025-03-04 16:11:13 +08:00
yangdx
002948d342 Added search mode and min degree filtering for NetworkX
- Implemented exact and inclusive search modes
- Added min degree filtering for nodes
- Updated API to parse label for search options
2025-03-04 16:08:05 +08:00
zrguo
81568f3bad fix linting 2025-03-04 15:53:20 +08:00
zrguo
3a2a636862 Implement the missing methods. 2025-03-04 15:50:53 +08:00
zrguo
0679ca4055 Update neo4j_impl.py 2025-03-04 14:20:55 +08:00
zrguo
fd9f71e0ee fix delete_by_doc_id 2025-03-04 13:22:33 +08:00
yangdx
11fdb60fe5 Remove Chinese comments 2025-03-03 01:30:41 +08:00
yangdx
465737efed Fix linting 2025-03-02 17:32:25 +08:00
yangdx
68bf02abb6 refactor: improve graph querying with label substring matching and security fixes 2025-03-02 16:20:37 +08:00
yangdx
0f1eb42c8d Add node limit and prioritization for knowledge graph retrieval
• Add MAX_GRAPH_NODES limit from env var
• Prioritize nodes by label match & connection
2025-03-02 15:39:14 +08:00
yangdx
1ca6837219 Add max nodes limit for graph retrieval of networkX
• Set MAX_GRAPH_NODES env var (default 1000)
• Change edge type to "RELATED"
2025-03-02 12:52:25 +08:00
yangdx
c0b22a8ae2 Merge branch 'main' into add-multi-worker-support 2025-03-02 02:54:57 +08:00
yangdx
7cd25fe5ab Improve shared storage cleanup and clarify initialization in multi-worker setup 2025-03-02 01:00:27 +08:00
yangdx
e8d0d065f3 fix: Improve async handling and FAISS storage reliability
- Add async context manager support
- Fix embedding data type conversion
- Improve error handling in FAISS ops
- Add multiprocess storage sync
2025-03-01 23:35:09 +08:00
yangdx
9aef112d51 Fix incorrect comment about update flag behavior in FAISS implementation 2025-03-01 22:27:12 +08:00
zrguo
4219454fab fix format 2025-03-01 17:45:06 +08:00
yangdx
e3a40c2fdb Fix linting 2025-03-01 16:23:34 +08:00