Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RAG/Knowledge for No ascii characters #2376

Closed
jolestar opened this issue Jan 16, 2025 · 4 comments
Closed

RAG/Knowledge for No ascii characters #2376

jolestar opened this issue Jan 16, 2025 · 4 comments
Labels
bug Something isn't working Need Feedback

Comments

@jolestar
Copy link

Describe the bug

The knowledge preprocessing function incorrectly removes non-ASCII characters like Chinese text due to an overly restrictive regex pattern that only allows ASCII alphanumeric characters.

To Reproduce

  1. Create a knowledge item with non-ASCII characters like Chinese text
  2. Call the preprocess function with this content:
const input = "你好 Eliza";
knowledge.preprocess(input)
  1. The Chinese characters are removed from the output

Expected behavior

The preprocess function should preserve non-ASCII characters like Chinese text

@jolestar jolestar added the bug Something isn't working label Jan 16, 2025
Copy link
Contributor

Hello @jolestar! Welcome to the elizaOS community. Thank you for opening your first issue; we appreciate your contribution. You are now an elizaOS contributor!

@AIFlowML
Copy link
Collaborator

Hello @jolestar I thnk that flter is somehow added to avoid some techniques of prompt injects.
We will address this soon in a more sophisticated way.

Copy link
Contributor

This issue has been automatically marked as stale due to 30 days of inactivity.
If no further activity occurs within 7 days, it will be closed automatically. Please take action if this issue is still relevant.

@jolestar
Copy link
Author

Is there some conclusion about this? @AIFlowML

@lalalune lalalune closed this as not planned Won't fix, can't repro, duplicate, stale Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Need Feedback
Projects
None yet
Development

No branches or pull requests

3 participants