It would be good to have some examples to test or see the real life results, like when you did the 75% discount example, I could see how we can semantically block ANY discount to be proposed by the llm, but will it work if we want to allow max 10% discount instead?
0.0.72 is the latest release, but there have been a few “prereleases”, which are all numbered from 0.1.0.dev0 to 0.1.0.dev3, because they’re prereleases, pip won’t install them unless you specify that exact version - once everything is ready I’ll mark the 0.1.0 full release
If you use a multilingual embedding model like those from OpenAI, you should be fine. It will likely work best when the utterances and input language are the same, but in theory, it should still function even if they are different.
I can put together an example for multilingual use - but yeah it's pretty easy, I'd probably recommend using Cohere's models if you want a hosted multilingual model, this link should help: - Cohere multilingual model ie "embed-multilingual-v3.0" huggingface.co/Cohere/Cohere-embed-multilingual-v3.0 In semantic router you would install the cohere dependency, ie `pip install semantic-router[cohere]` then use their encoder like: ``` import os from semantic_router.encoders import CohereEncoder os.environ["COHERE_API_KEY"] = "your_api_key" encoder = CohereEncoder(name="embed-multilingual-v3.0") ``` With that you're good to go :)
such a cool idea - and it does exactly what it sounds like it needs to do. will be very useful for tool use and llm routing
yeah we use it all the time for a lot of different things, I'm planning to share more hands on examples soon
It would be good to have some examples to test or see the real life results, like when you did the 75% discount example, I could see how we can semantically block ANY discount to be proposed by the llm, but will it work if we want to allow max 10% discount instead?
Great video! However, Doesn't the latest version (0.0.72) use RouteLayer instead of SemanticRouter?
0.0.72 is the latest release, but there have been a few “prereleases”, which are all numbered from 0.1.0.dev0 to 0.1.0.dev3, because they’re prereleases, pip won’t install them unless you specify that exact version - once everything is ready I’ll mark the 0.1.0 full release
Would the semantic router work if the questions are written in different languages?
If you use a multilingual embedding model like those from OpenAI, you should be fine. It will likely work best when the utterances and input language are the same, but in theory, it should still function even if they are different.
I can put together an example for multilingual use - but yeah it's pretty easy, I'd probably recommend using Cohere's models if you want a hosted multilingual model, this link should help:
- Cohere multilingual model ie "embed-multilingual-v3.0" huggingface.co/Cohere/Cohere-embed-multilingual-v3.0
In semantic router you would install the cohere dependency, ie `pip install semantic-router[cohere]` then use their encoder like:
```
import os
from semantic_router.encoders import CohereEncoder
os.environ["COHERE_API_KEY"] = "your_api_key"
encoder = CohereEncoder(name="embed-multilingual-v3.0")
```
With that you're good to go :)
Thanks! 💯