Skip to content

Update userguide notebooks, fix typos and docs updates#523

Merged
nkanu17 merged 3 commits intomainfrom
fix-typos-and-docs-updates
Mar 3, 2026
Merged

Update userguide notebooks, fix typos and docs updates#523
nkanu17 merged 3 commits intomainfrom
fix-typos-and-docs-updates

Conversation

@nkanu17
Copy link
Collaborator

@nkanu17 nkanu17 commented Mar 2, 2026

Summary

This PR includes typo fixes, export corrections, and documentation enhancements for the RedisVL user guides (llmcache).

Changes

Code Fixes

  • redisvl/__init__.py: Fixed all__all__ (proper Python dunder variable)
  • redisvl/query/query.py: Fixed docstring typo index.yaml"index.yaml"
  • redisvl/schema/schema.py: Fixed docstring typo "tag}"tag"}
  • redisvl/query/__init__.py: Added HybridQuery to __all__ exports

Documentation Updates

  • CONTRIBUTING.md: Updated Python version requirement from 3.8 → 3.9 and corrected linting commands

User Guide Enhancements

01_getting_started.ipynb

  • Added new section: "Fetch and Manage Records"
    • fetch() by ID
    • key() method for getting full Redis keys
    • Listing all keys with paginate() and FilterQuery
    • drop_keys() and drop_documents() for deletion

03_llmcache.ipynb

  • Added new section: "Entry IDs and Keys"
    • How entry_id is generated (SHA256 hash of prompt + filters)
    • Difference between entry_id and key
    • Fetching entries by ID using _index.fetch()
    • Listing all keys in cache
    • Deleting specific entries with drop(ids=[...]) or drop(keys=[...])
  • Added new section: "TTL Behavior Details"
    • Table explaining TTL behavior in different scenarios
    • Warning about check() adding TTL to previously-permanent entries
    • TTL refresh behavior explanation (sliding window pattern)
  • Executed notebook and saved with cell outputs visible

Testing

  • All notebook code cells validated and executed successfully
  • Upgraded sentence-transformers to 5.2.3 to remove version warning in outputs

Note

Low Risk
Low risk: changes are primarily documentation/notebook updates plus small, backward-compatible fixes to module exports and docstring examples.

Overview
Updates contributor and user documentation, including a refreshed CONTRIBUTING.md (Python 3.9+ and updated UV lint/format commands) and expanded user-guide notebooks.

The 01_getting_started.ipynb guide now includes a new Fetch and Manage Records section demonstrating fetch(), key(), paginate() enumeration, and record deletion via drop_keys()/drop_documents(), with some notebook cell reordering.

The 03_llmcache.ipynb guide adds explanations and examples for entry IDs vs Redis keys, targeted fetch/delete of cache entries, and detailed TTL/TTL-refresh behavior; it also updates the embedding model used in examples.

Minor library cleanup fixes __all__ in redisvl/__init__.py, exports HybridQuery from redisvl/query/__init__.py, and corrects a couple of docstring typos in query.py and schema.py.

Written by Cursor Bugbot for commit 622aaa5. This will update automatically on new commits. Configure here.

Copilot AI review requested due to automatic review settings March 2, 2026 22:34
@jit-ci
Copy link

jit-ci bot commented Mar 2, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates RedisVL’s user guide notebooks (notably the LLM cache guide), fixes a few docstring typos, and corrects package exports/documentation to better match current project structure and tooling.

Changes:

  • Fix minor Python docstring/examples and __all__ exports (redisvl/__init__.py, query/schema docstrings, query exports).
  • Enhance user-guide notebooks with new sections on record management and LLM cache IDs/TTL behavior.
  • Update CONTRIBUTING.md to reflect Python 3.9+ and current formatting tooling (isort + black).

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
redisvl/schema/schema.py Fixes a docstring example typo for tag field creation.
redisvl/query/query.py Fixes a docstring example to pass a filename string to from_yaml.
redisvl/query/__init__.py Exports HybridQuery via __all__.
redisvl/__init__.py Corrects export list to use __all__.
docs/user_guide/03_llmcache.ipynb Adds sections on entry IDs/keys and TTL behavior; notebook outputs updated.
docs/user_guide/01_getting_started.ipynb Adds a “Fetch and Manage Records” section and reorganizes subsequent content.
CONTRIBUTING.md Updates minimum Python version and adjusts direct-formatting commands to isort/black.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nkanu17 nkanu17 requested review from abrookins and rbs333 March 2, 2026 22:49
Copy link
Collaborator

@abrookins abrookins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

"# Really try to trick it by asking around the point\n",
"# But is able to slip just under our new threshold\n",
"question = \"What is the capital city of the country in Europe that also has a city named Nice?\"\n",
"question = \"What is the capital of the country where Nice is located?\"\n",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notebook committed with IndexError in cell output

High Severity

Cell 16 in 03_llmcache.ipynb was committed with an IndexError: list index out of range in its output. The cell is supposed to demonstrate that a semantically similar question ("What is the capital of the country where Nice is located?") matches the cached entry under the widened 0.5 threshold, but llmcache.check() returns an empty list. The comment says "But is able to slip just under our new threshold" — but it doesn't match. This likely broke when the embedding model was changed from redis/langcache-embed-v1 to redis/langcache-embed-v2. Users following this tutorial will see a traceback error as the expected output.

Fix in Cursor Fix in Web

@nkanu17 nkanu17 force-pushed the fix-typos-and-docs-updates branch from 7bc2448 to 3b7fb19 Compare March 3, 2026 01:06
@nkanu17 nkanu17 force-pushed the fix-typos-and-docs-updates branch from 3b7fb19 to 622aaa5 Compare March 3, 2026 01:09
Copy link
Collaborator

@justin-cechmanek justin-cechmanek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼
All the formal fixes look good. If the notebooks run then it's all good!

@nkanu17 nkanu17 merged commit 2bbe8b2 into main Mar 3, 2026
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants