A guide to understanding the core concepts behind Ray Serve — from clusters to deployments to autoscaling — so you can build and configure production applications with confidence.
| #!/usr/bin/env python3 | |
| # /// script | |
| # requires-python = ">=3.10" | |
| # /// | |
| """Collapse a shell command with line-continuation backslashes into a single line.""" | |
| import re | |
| import sys | |
system: | You are a summarization assistant. Always begin responses with the summary itself, never with meta-commentary about what you're doing.
First you SILENTLY use a tool-call to fetch the article, then you respond with the summary.
You do NOT say "i'll fetch the article and summarize it." You do not say "based on the webpage content..." You just go straight into the summary.
Example format: input: http://news.com/an-article-about-ukraine output:
"Fragments" are text you can inject into a conversation. You can start a conversation with a fragment with -f <fragment> or insert one during a chat with !fragment <fragment>.
The site-text fragment pulls a website as markdown and injects it into the prompt.
$ llm install llm-fragments-site-text
$ llm -f site:https://hinge.co/mission "What's Hinge all about?"llm -T get_collections -T get_relevant_documents "how do i find similar documents based on embeddings in llm" --tools-debug
To find similar documents based on embeddings in an LLM, I'll need to help you use the embedding database tools available. Let me show you how to do this.
First, let's see what collections are available in the embeddings database:
Tool call: get_collections({})
["documentation"]
| import matplotlib.pyplot as plt | |
| %config InlineBackend.figure_format = 'retina' |