Skip to content

Conversation

@abrookins
Copy link
Collaborator

Following on #437, we find and encode/decode more problematic characters used within attribute values in LangCache. This PR also adds a comprehensive punctuation test for other characters.

Copilot AI review requested due to automatic review settings November 21, 2025 18:08
Copilot finished reviewing on behalf of abrookins November 21, 2025 18:09
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 extends the LangCache attribute encoding mechanism to handle backslash (\) and question mark (?) characters in attribute values by mapping them to fullwidth Unicode equivalents. This follows the same pattern established in PR #437 for comma and slash characters.

  • Adds two new character mappings to the encoding/decoding translation tables
  • Updates unit test to verify encoding/decoding of backslash and question mark
  • Adds comprehensive integration tests for newly supported special characters and all tokenizer separators

Reviewed changes

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

File Description
redisvl/extensions/cache/llm/langcache.py Adds backslash and question mark mappings to the attribute encoding/decoding translation tables
tests/unit/test_langcache_semantic_cache.py Updates mock data and assertions to include backslash and question mark in encoded attribute values
tests/integration/test_langcache_semantic_cache_integration.py Adds new integration tests for backslash/question mark handling and comprehensive tokenizer separator testing

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

@bsbodden bsbodden self-requested a review November 21, 2025 19:41
Copy link
Collaborator

@bsbodden bsbodden left a comment

Choose a reason for hiding this comment

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

Ship it!

@abrookins abrookins merged commit f51c00b into main Nov 21, 2025
44 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.

3 participants