Translate text between languages
Automatically translate content into multiple languages using LLMs.
Generate concise summaries of long text, articles, or documents using large language models.
Text · Notebook · Updated
Colab runs it in your browser. If it calls a model provider, it asks for that provider's API key in a cell.
You add a computed column that calls an LLM to generate summaries. When you insert new text, summaries are generated automatically.
pip install pixeltable openai
OPENAI_API_KEYopenai.chat_completions()pxt.create_table()insert()add_computed_column()# Create prompt template for summarizationprompt = ('Summarize the following article in 2-3 sentences:\n\n'+ articles.content)# Add computed column for LLM responsearticles.add_computed_column(response=openai.chat_completions(messages=[{'role': 'user', 'content': prompt}],model='gpt-4o-mini',))
One cell of the notebook, copied as it is. Open it in Colab for the rest.
Automatically translate content into multiple languages using LLMs.
Identify and extract people, organizations, locations, dates, and other entities from text using LLMs.
Insert a URL as a document, then compare chunking strategies on it
Break PDFs and documents into searchable chunks for retrieval-augmented generation (RAG) pipelines.