491 Commits

Author SHA1 Message Date
Derek Worthen f40e9a26ce Cleanup (#2528)
* Resolve #2521

* Update readmes.

* Resolves #2520

* Resolves #2517

* Add semver.
2026-08-24 11:28:19 -07:00
Copilot a445be7364 Update dependencies to latest versions (dependency sweep) (#2523)
* Initial plan

* Update dependencies to latest versions (dependency sweep)

Co-authored-by: dworthen <624870+dworthen@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: dworthen <624870+dworthen@users.noreply.github.com>
2026-08-24 10:15:36 -07:00
Derek Worthen 6dad6d2b05 Release v3.1.2 (#2519)
* Release v3.1.2

* Fix typos.
2026-08-21 08:18:50 -07:00
Copilot cf2ddd3c9d Dependency update sweep (#2516)
* Initial plan

* Update dependencies to latest versions; hold nltk 3.9.x; ignore ruff 0.16 preview rules

Co-authored-by: dworthen <624870+dworthen@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: dworthen <624870+dworthen@users.noreply.github.com>
2026-08-21 07:19:59 -07:00
Derek Worthen 7bb23cc7f3 Fix update-deps skill to work with msft feed. (#2510) 2026-08-19 06:55:52 -07:00
Derek Worthen 03c7a3d2b2 Automate dependency updates. (#2507)
* Automate dependency updates.

* Fix workflow token.
2026-08-18 13:24:05 -07:00
Derek Worthen 60668ba946 Update contributing doc. (#2500) 2026-08-14 11:14:01 -07:00
Derek Worthen ee2e4a735f Local search notebook (#2488)
* Fix local search notebook. Resolves #2387

* Fix formatting.
2026-08-14 10:02:39 -07:00
Derek Worthen 00adeaf713 Pr 2480/docs/spelling sweep (#2487)
* docs: fix spelling and prose

* Update docstring. Resolves #2475

* Fix git link. Resolves #2474

* Fix formatting.

* Fix doc string parameters.

---------

Co-authored-by: Nathan Evans <github@talkswithnumbers.com>
2026-08-14 09:03:56 -07:00
Derek Worthen 21f7bdf6bd Add notice. (#2486) 2026-08-14 08:08:25 -07:00
Derek Worthen 80404b991e Pr 2481/danfiedler/pin actions (#2485)
Pin GitHub Actions to full-length commit SHAs

Co-authored-by: Dan Fiedler <danfiedler@microsoft.com>
2026-08-14 08:05:53 -07:00
Derek Worthen e810e63ac1 Fix/cache event loop lifecycle (#2484)
fix(llm): preserve event loop in sync cache

Co-authored-by: FU-max-boop <214359569+FU-max-boop@users.noreply.github.com>
2026-08-13 13:21:02 -07:00
Derek Worthen 3fd883e503 Change default package feed index. (#2483) 2026-08-13 11:38:44 -07:00
gaudyb 14a00ad88f Release v3.1.1 (#2458)
gh-pages / build (push) Has been cancelled
Python Build and Type Check / python-ci (ubuntu-latest, 3.11) (push) Has been cancelled
Python Build and Type Check / python-ci (ubuntu-latest, 3.13) (push) Has been cancelled
Python Build and Type Check / python-ci (windows-latest, 3.11) (push) Has been cancelled
Python Build and Type Check / python-ci (windows-latest, 3.13) (push) Has been cancelled
Python Integration Tests / python-ci (ubuntu-latest, 3.13) (push) Has been cancelled
Python Integration Tests / python-ci (windows-latest, 3.13) (push) Has been cancelled
Python Notebook Tests / python-ci (ubuntu-latest, 3.13) (push) Has been cancelled
Python Notebook Tests / python-ci (windows-latest, 3.13) (push) Has been cancelled
Python Publish (pypi) / Upload release to PyPI (push) Has been cancelled
Python Smoke Tests / python-ci (ubuntu-latest, 3.13) (push) Has been cancelled
Python Smoke Tests / python-ci (windows-latest, 3.13) (push) Has been cancelled
Python Unit Tests / python-ci (ubuntu-latest, 3.13) (push) Has been cancelled
Python Unit Tests / python-ci (windows-latest, 3.13) (push) Has been cancelled
Spellcheck / spellcheck (push) Has been cancelled
v3.1.1
2026-07-17 19:16:53 -06:00
Nathan Evans 0bb2865785 Fix JSONL loader handling of blank/invalid lines (#2434)
* Fix JSONL loader for blank and invalid rows

* Sync docs for schema and metadata fields

* Revert "Sync docs for schema and metadata fields"

This reverts commit 55f170f7d25f58ba4494f2dee8c5690fd282c778.
2026-07-17 14:45:30 -07:00
Nathan Evans 82c339a8bf Sync docs for schema and metadata fields (#2435)
* Sync docs for schema and metadata fields

* Clarify prepend_metadata raw_data note

* Align docs notebooks with v3 model APIs

* Clean notebook formatting in v3 model cells

* Use clean global_search params without pop workaround

* Fix dynamic global search notebook JSON mode param conflict

* Remove unused imports in docs drift notebook

* Restore drift notebook data setup variables

* Apply ruff format to drift notebook

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* remove outputs

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-17 13:41:03 -07:00
gaudyb f5af4d251f Fix cannot release un-acquired lock in Blob logger (#2457)
* fix issue-2170

* semversioner change

* test changes

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* fix syntax mismatch

---------

Co-authored-by: Gaudy Blanco <gaudy-microsoft@MacBook-Pro-m4-Gaudy-For-Work.local>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-17 13:27:16 -07:00
gaudyb 27a3675485 Issue 2265: Column length mismatch (#2442)
* fix issue 2265

* add semversioneer

* copilot feedback

---------

Co-authored-by: Gaudy Blanco <gaudy-microsoft@MacBook-Pro-m4-Gaudy-For-Work.local>
Co-authored-by: Nathan Evans <github@talkswithnumbers.com>
2026-07-17 12:46:37 -06:00
gaudyb 49c0911d0d Missing return type hints on generator functions in query/llm/text_utils.py (#2443)
* fix issue-2330

* semversioner change

* copilot feedback

---------

Co-authored-by: Gaudy Blanco <gaudy-microsoft@MacBook-Pro-m4-Gaudy-For-Work.local>
2026-07-17 11:22:29 -07:00
Derek Worthen 64a95d3d51 Dep sweep (#2441)
* build(deps): refresh lockfile and bump runtime constraints

- Refresh uv.lock within existing ranges (ruff 0.15.21, pyright 1.1.411)
- Bump azure-search-documents ~=12.0, pyarrow ~=25.0, aiofiles ~=25.1, lancedb ~=0.34.0, litellm ==1.92.0, pandas ~=3.0 (+ pandas-stubs)
- Hold graspologic-native on 1.2.x (1.3 changes Leiden clustering output)
- pandas 3.0: drop removed copy= kwarg from merge/concat calls
- Fix lint/type fallout from newer ruff/pyright to keep poe check green
- Hygiene: pin toml, dedupe markitdown, fix graphrag-input pin whitespace

* build(deps-dev): bump dev tooling to latest majors

- pytest ~=9.1, pytest-asyncio ~=1.4 (asyncio AUTO mode preserved)
- ipykernel ~=7.3
- semversioner ~=3.0 (verified current-version + changelog CLI)

* ci(dependabot): switch to uv ecosystem and cover workspace packages

- Use the dedicated uv ecosystem instead of generic pip
- Scan the workspace root and all packages/* member manifests via directories glob
- Group azure-* and dev tooling to reduce PR noise; group github-actions
- unified-search-app remains excluded (separate project at repo root)

* Bump dependencies.

* Fix type check and tests.

* Fix drift search.

* Fix streaming.

* Fix context management.
2026-07-17 08:38:45 -07:00
Derek Worthen dac4f721dd Fix .strip call (#2431)
- Resolves #2381
2026-07-10 14:00:01 -07:00
Derek Worthen 94a2095c6f Loosen service_tier type to str | None to allow for more flexibility … (#2430)
Loosen service_tier type to str | None to allow for more flexibility in service tier representation.

- Resolves #2389
2026-07-10 13:56:28 -07:00
Derek Worthen 2741015057 Fix logging bug. (#2429)
- Resolves #2254
2026-07-10 13:52:09 -07:00
Derek Worthen 6d02c2355c Update getting started docs. (#2367) 2026-05-28 09:53:15 -07:00
Derek Worthen 8679794df3 Release v3.1.0 (#2366) 2026-05-28 08:51:39 -07:00
Derek Worthen f7016ddfd0 Update litellm dependency. (#2365)
- Resolves #2331
2026-05-28 08:16:24 -07:00
disamhembere de531f0a69 feat: native CosmosTableProvider with namespace partitioning (#2354)
* feat: native CosmosTableProvider with namespace partitioning

Replace the parquet-decomposition approach in AzureCosmosStorage with a
native CosmosTableProvider that implements TableProvider directly:

- CosmosTableProvider: stores DataFrame rows as Cosmos documents with
  /namespace partition key. All queries are single-partition (no fan-out).
- CosmosTable: streaming Table impl with async SDK and server-side pagination.
- AzureCosmosStorage: simplified to key-value only (context.json, stats.json,
  cache). child() now works via ':'-separated namespace prefixes.
- TableProvider.child(): new non-abstract method for namespace isolation.
  ParquetTableProvider/CSVTableProvider delegate to Storage.child().
- Pipeline wiring: run_pipeline.py and utils.py use table_provider.child()
  for update-run delta/previous isolation.
- Legacy fallback: CosmosTableProvider reads from old containers when
  legacy_container is configured, enabling transparent migration.

Tested against Cosmos DB Linux emulator (vNext, ARM64).
302 unit tests + 15 verb tests pass (no regressions).

* fix: remove enable_cross_partition_query from async SDK calls

The async azure-cosmos SDK (v4.9) leaks this kwarg through to
aiohttp.ClientSession, causing TypeError. Omitting partition_key
achieves the same cross-partition behavior automatically.

Also documents the caveat in the design doc.

Verified: migration test passes all 5 phases against Cosmos emulator.

* feat: transactional batch writes with configurable batch_size

Add batch_size parameter (default 50, max 100) to CosmosTableProvider
and CosmosTable. Documents are written using Cosmos transactional
batch (execute_item_batch) for ~50× fewer network round-trips.

If a batch fails (e.g. payload too large), falls back to individual
upserts for that chunk so partial progress is never lost.

Config: table_provider.batch_size in settings.yaml
Propagates through child() and open() to streaming writes.

Tested: 120 rows at batch_size=50, 25 rows at batch_size=10,
75 streamed rows, clamping to max 100, child inheritance.

* chore: lint cleanup and dead code removal

- Remove unused _INTERNAL_FIELDS constant (duplicated _COSMOS_SYSTEM_KEYS)
- Fix TRY300: move returns to else blocks in AzureCosmosStorage
- Fix SIM105: use contextlib.suppress for CosmosResourceNotFoundError
- Fix SLF001: replace __new__ + private attr copy with __init__ in child()
- Fix RUF002: replace en-dash with hyphen in docstrings
- Fix D105: add __aiter__ docstring
- Add noqa: PERF401 for async iteration (false positive: no async listcomp)
- All ruff checks pass, pyright 0 errors, 317 tests pass

* fix: address code review findings

Critical fixes:
- Fix ID round-trip corruption: _strip_cosmos_metadata now restores
  original id from row_id field. Previously, read_dataframe returned
  '{table_name}:{key}' instead of the pipeline's original id value.
- Always store row_id on write (consistent between provider and table).
- has() now catches CosmosResourceNotFoundError specifically instead of
  bare Exception — auth/network errors propagate correctly.

Medium fixes:
- Add asyncio.Lock to _ensure_container() for concurrent-task safety.
- _batch_upsert catches only CosmosBatchOperationError for fallback;
  other exceptions (auth, network) now propagate instead of silently
  falling back to individual upserts.

Verified: ID round-trip, streaming write, no-id tables all pass
against Cosmos emulator. 317 unit/verb tests pass.

* chore: fix spellcheck and add semversioner change

- Add dictionary words: aiohttp, aiter, colls, serde, upserts, vnext
- Fix British spellings: serialisation→serialization, initialisation→initialization, behaviour→behavior
- Replace 'Unparameterized' with 'Non-parameterized'
- Add semversioner minor change file

* fix: update test_clear assertion for new clear() behavior

clear() now drops and recreates the container instead of deleting the
entire database. The container and database clients remain valid after
clear() — only the data is removed.

* refactor: extract Cosmos connection from Storage, not TableProviderConfig

Connection fields (connection_string, account_url, database_name) removed
from TableProviderConfig. The factory extracts them from the affiliated
AzureCosmosStorage instance when table_provider.type is cosmosdb.

This eliminates config duplication — credentials are defined once on
output_storage, and table_provider only carries table-specific fields
(container_name, batch_size, legacy_container).

Config example:
  output_storage:
    type: cosmosdb
    account_url: https://...
    database_name: graphrag
    container_name: graphrag-kv
  table_provider:
    type: cosmosdb
    container_name: graphrag-tables
    batch_size: 50

* perf: batch deletes in _delete_table to match write batching

Use transactional batches for delete operations instead of
one-at-a-time delete_item calls, mirroring the _batch_upsert pattern.
Falls back to individual deletes on CosmosBatchOperationError.
2026-05-13 12:25:45 -07:00
gaudyb 0da2a4dd3e Release v3.0.9 (#2321)
Co-authored-by: Gaudy Blanco <gaudy-microsoft@MacBook-Pro-m4-Gaudy-For-Work.local>
3.0.9
2026-04-13 13:21:05 -06:00
gaudyb 080e665c23 parquet reader implementation as a new input type (#2320)
parquet reader impl

Co-authored-by: Gaudy Blanco <gaudy-microsoft@MacBook-Pro-m4-Gaudy-For-Work.local>
2026-04-09 14:03:13 -06:00
Derek Worthen ebc8d61f46 Support client side json validation. (#2306)
- Addresses #2286
- Resolves #2263
2026-04-07 08:09:40 -07:00
Derek Worthen b1f0e6c345 Fix broken documentation links. (#2305)
- Addresses #2258 and #2287
- Resolves #2249

Co-authored-by: Br1an67 <932039080@qq.com>
2026-03-30 06:46:02 -07:00
Derek Worthen 74239e8e14 Release v3.0.8 (#2299) 2026-03-27 11:45:08 -07:00
Derek Worthen df2a8b32e0 bump nltk to resolve [CVE-2025-14009](https://github.com/advisories/GHSA-7p94-766c-hgjp) (#2298) 2026-03-27 08:52:22 -07:00
Derek Worthen ac142c5ed4 Release v3.0.7 (#2291) 2026-03-24 10:15:48 -07:00
Derek Worthen f0fd676729 Pin litellm dependency (#2290)
- Response to #2289
2026-03-24 09:30:11 -07:00
Dayenne Souza 3502c22209 reconfigure vector store size (#2281) 2026-03-17 14:09:55 -07:00
Dayenne Souza ae2508d37a Release v3.0.6 (#2267) 2026-03-06 17:02:49 -03:00
Dayenne Souza bb9afeb898 nlp streaming (#2264)
* fix cooccurences

* unused async fixes
2026-03-03 18:59:21 -03:00
Dayenne Souza bfd42c1ecd remove relationships with phantom entities (#2261)
* filter phantom relationships

* fix flush size
2026-03-03 10:18:34 -03:00
Dayenne Souza 1ceb00c4de Release v3.0.5 (#2252) v3.0.5 2026-02-27 18:17:11 -03:00
Dayenne Souza 6f26d0ec6f vector load_documents in batches (#2251)
* vectors bulk load_documents

* vector load

* add upsert work into dictionary

* fic dictionary
2026-02-27 17:59:11 -03:00
Dayenne Souza 64c55522fd fix csv file reader (#2248)
* fix

* fix test with inline content

* fix format
2026-02-24 22:10:59 -03:00
gaudyb a82d186fd2 Release v3.0.4 (#2247)
* Release v3.0.4

* release v3.0.4
v3.0.4
2026-02-24 16:51:02 -06:00
gaudyb 0a29d27825 Release v3.0.3 (#2245)
Co-authored-by: Gaudy Blanco <gaudy-microsoft@MacBook-Pro-m4-Gaudy-For-Work.local>
2026-02-24 14:54:28 -06:00
Dayenne Souza 47fae95393 write stats per workflow (#2244)
add stats write
2026-02-23 19:17:21 -03:00
Dayenne Souza 1cedb796b3 streaming create_final_documents (#2243)
* streaming create_final_documents

* add semversioner
2026-02-23 14:16:39 -03:00
Dayenne Souza ba9169a232 streaming finalize_graph (#2240)
* add streaming

* add patch

* fix spelling

* add improvements and test
2026-02-23 13:57:52 -03:00
Nathan Evans cd0c405887 feat(graphrag-vectors): add filtering, timestamps, and CRUD operations (#2236)
* feat(graphrag-vectors): add filtering, timestamps, and CRUD operations

Implement the vector store enhancements from the graphrag-vectors-design spec:

New modules:
- filtering.py: Pydantic-based filter expression system with F builder,
  operator overloads, JSON serialization, client-side evaluate(), and
  per-backend compilation (SQL for LanceDB/CosmosDB, OData for Azure AI Search)
- timestamp.py: ISO 8601 timestamp explosion into filterable component fields

Enhanced VectorStoreDocument:
- data: dict for user-defined metadata fields
- create_date / update_date: automatic ISO 8601 timestamps

Enhanced VectorStore base class:
- fields config for typed metadata columns
- insert / count / remove / update CRUD methods
- select, filters, include_vectors params on search methods
- Automatic timestamp explosion on insert/update
- User-defined date field explosion

Backend implementations (LanceDB, Azure AI Search, CosmosDB):
- Full filter compilation to native query languages
- Typed schema creation with user-defined fields
- All new CRUD operations

Breaking changes:
- search_by_id raises IndexError when document not found
- Updated indexer_adapters.py caller to handle the new exception

Tests:
- 54 unit tests for filtering and timestamp modules
- 28 LanceDB integration tests covering CRUD, filters, timestamps, select,
  include_vectors, and user-defined date field explosion

* fix: resolve CI build failures (formatting, lint, pyright, test mocks)

- Fix ruff formatting and lint errors across all changed files
- Refactor filtering.py: move operator overloads from monkey-patching to
  direct class methods for pyright visibility
- Use validation_alias/serialization_alias with populate_by_name for
  Pydantic AND/OR/NOT models (pyright + runtime compatible)
- Use Operator enum members instead of string literals in FieldRef
- Add missing abstract methods (insert, count, remove, update) to test
  mock VectorStore classes
- Update mock method signatures to match base class (select, filters,
  include_vectors params)
- Add docstrings to FieldRef magic methods (ruff D105)
- Fix noqa:S608 placement in cosmosdb.py

* feat: add top-level vector_size to VectorStoreConfig

Add a vector_size field (default 3072) to VectorStoreConfig so users
can set it once instead of on every individual index schema. The value
is propagated to new IndexSchema entries during validation.

* chore: add semversioner patch entry

* chore: add ismatch and ftype to spellcheck dictionary

* Add example notebooks for LanceDB, Azure AI Search, and CosmosDB vector stores

- Three notebooks demonstrating: document loading, similarity search, metadata
  filtering with F builder, timestamp filtering, document update/removal
- Sample data files (text_units.parquet, embeddings.text_unit_text.parquet)
- Add CPY001, SLF001, DTZ005 to notebook lint ignores in pyproject.toml

* refactor: extract model/tokenizer creation from generate_text_embeddings into callers
2026-02-20 15:39:08 -08:00
Dayenne Souza 97045b55fe generate_text_embeddings streaming (#2241)
* addd streaming

* fixes
2026-02-20 19:53:32 -03:00
Dayenne Souza bf1034a7eb Streaming create_final_text_units (#2238)
* addd streaming to create_final_text_units - also removed pandas from its internal workflow logic

* fix comment

* fix test

* fix typo

* add suggestion

* add csv tests data

* fix spell
2026-02-20 11:18:00 -03:00