sketch VS Constrained-Text-Generation-Studio

Compare sketch vs Constrained-Text-Generation-Studio and see what are their differences.

Constrained-Text-Generation-Studio

Code repo for "Most Language Models can be Poets too: An AI Writing Assistant and Constrained Text Generation Studio" at the (CAI2) workshop, jointly held at (COLING 2022) (by Hellisotherpeople)
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
sketch Constrained-Text-Generation-Studio
20 25
2,198 195
0.9% -
4.4 4.1
3 months ago 9 months ago
Python Python
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

sketch

Posts with mentions or reviews of sketch. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-02-05.
  • Ask HN: What have you built with LLMs?
    43 projects | news.ycombinator.com | 5 Feb 2024
    We've made a lot of data tooling things based on LLMs, and are in the process of rebranding and launching our main product.

    1. sketch (in notebook, ai for pandas) https://github.com/approximatelabs/sketch

    2. datadm (open source, "chat with data", with support for the open source LLMs (https://github.com/approximatelabs/datadm)

    3. Our main product: julyp. https://julyp.com/ (currently under very active rebrand and cleanup) -- but a "chat with data" style app, with a lot of specialized features. I'm also streaming me using it (and sometimes building it) every weekday on twitch to solve misc data problems (https://www.twitch.tv/bluecoconut)

    For your next question, about the stack and deploy:

  • Pandas AI – The Future of Data Analysis
    7 projects | news.ycombinator.com | 17 May 2023
    This morning I added a "Related Projects" [3] Section to the Buckaroo docs. If Buckaroo doesn't solve your problem, look at one of the other linked projects (like Mito).

    [1] https://github.com/approximatelabs/sketch

    [2] https://github.com/paddymul/buckaroo

    [3] https://buckaroo-data.readthedocs.io/en/latest/FAQ.html

  • Ask HN: What's your favorite GPT powered tool?
    16 projects | news.ycombinator.com | 15 May 2023
    For GPT/Copilot style help for pandas, in notebooks REPL flow (without needing to install plugins), I built sketch. I genuinely use it every-time I'm working on pandas dataframes for a quick one-off analysis. Just makes the iteration loop so much faster. (Specifically the `.sketch.howto`, anecdotally I actually don't use `.sketch.ask` anymore)

    https://github.com/approximatelabs/sketch

  • RasaGPT: First headless LLM chatbot built on top of Rasa, Langchain and FastAPI
    13 projects | news.ycombinator.com | 8 May 2023
    https://github.com/approximatelabs/lambdaprompt It has served all of my personal use-cases since making it, including powering `sketch` (copilot for pandas) https://github.com/approximatelabs/sketch

    Core things it does: Uses jinja templates, does sync and async, and most importantly treats LLM completion endpoints as "function calls", which you can compose and build structures around just with simple python. I also combined it with fastapi so you can just serve up any templates you want directly as rest endpoints. It also offers callback hooks so you can log & trace execution graphs.

    All together its only ~600 lines of python.

    I haven't had a chance to really push all the different examples out there, but most "complex behaviors", so there aren't many patterns to copy. But if you're comfortable in python, then I think it offers a pretty good interface.

    I hope to get back to it sometime in the next week to introduce local-mode (eg. all the open source smaller models are now available, I want to make those first-class)

  • [D] The best way to train an LLM on company data
    7 projects | /r/MachineLearning | 29 Mar 2023
    Please look at sketch and langchain pandas/SQL plugins. I have seen excellent results with both of these approaches. Both of these approaches will require you to send metadata to openAI.
  • Meet Sketch: An AI code Writing Assistant For Pandas
    1 project | /r/machinelearningnews | 1 Feb 2023
    πŸ‘‰ Understand your data through questions πŸ‘‰ Create code from plain text Quick Read: https://www.marktechpost.com/2023/02/01/meet-sketch-an-ai-code-writing-assistant-for-pandas/ Github: https://github.com/approximatelabs/sketch
  • Replacing a SQL analyst with 26 recursive GPT prompts
    5 projects | news.ycombinator.com | 25 Jan 2023
    (3) Asking for re-writes of failed queries (happens occasionally) also helps

    The main challenge I think with a lot of these "look it works" tools for data applications, is how do you get an interface that actually will be easy to adopt. The chat-bot style shown here (discord and slack integration) I can see being really valuable, as I believe there has been some traction with these style integrations with data catalog systems recently. People like to ask data questions to other people in slack, adding a bot that tries to answer might short-circuit a lot of this!

    We built a prototype where we applied similar techniques to the pandas-code-writing part of the stack, trying to help keep data scientists / data analysts "in flow", integrating the code answers in notebooks (similar to how co-pilot puts suggestions in-line) -- and released https://github.com/approximatelabs/sketch a little while ago.

  • FLiP Stack Weekly for 21 Jan 2023
    19 projects | dev.to | 23 Jan 2023
    Python AI Helper https://github.com/approximatelabs/sketch
  • LangChain: Build AI apps with LLMs through composability
    8 projects | news.ycombinator.com | 17 Jan 2023
  • Show HN: Sketch – AI code-writing assistant that understands data content
    1 project | /r/patient_hackernews | 16 Jan 2023

Constrained-Text-Generation-Studio

Posts with mentions or reviews of Constrained-Text-Generation-Studio. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-04-06.
  • Photoshop for Text (2022)
    2 projects | news.ycombinator.com | 6 Apr 2024
    Oh my god. I wrote a whole library called "Constrained Text Generation Studio" where I mused that I wanted a "Photoshop for Text". I'm not even sure which work predates the other: https://github.com/Hellisotherpeople/Constrained-Text-Genera...

    The core idea of a "photoshop for text", specifically a word processor made for prosumers supporting GenAI first class (i.e oobabooga but actually good) - is worth so much. If you're a VC reading this, chances are I want to talk to you to actually execute on the idea from the OP

  • Ask HN: What have you built with LLMs?
    43 projects | news.ycombinator.com | 5 Feb 2024
    I was working on this stuff before it was cool, so in the sense of the precursor to LLMs (and sometimes supporting LLMs still) I've built many things:

    1. Games you can play with word2vec or related models (could be drop in replaced with sentence transformer). It's crazy that this is 5 years old now: https://github.com/Hellisotherpeople/Language-games

    2. "Constrained Text Generation Studio" - A research project I wrote when I was trying to solve LLM's inability to follow syntactic, phonetic, or semantic constraints: https://github.com/Hellisotherpeople/Constrained-Text-Genera...

    3. DebateKG - A bunch of "Semantic Knowledge Graphs" built on my pet debate evidence dataset (LLM backed embeddings indexes synchronized with a graphDB and a sqlDB via txtai). Can create compelling policy debate cases https://github.com/Hellisotherpeople/DebateKG

    4. My failed attempt at a good extractive summarizer. My life work is dedicated to one day solving the problems I tried to fix with this project: https://github.com/Hellisotherpeople/CX_DB8

  • You need a mental model of LLMs to build or use a LLM-based product
    2 projects | news.ycombinator.com | 13 Nov 2023
    My mental model for LLMs was built by carefully studying the distribution of its output vocabulary at every time step.

    There are tools that allow you to right click and see all possible continuations for an LLM like you would in a code IDE[1]. Seeing what this vocabulary is[2] and how trivial modifications to the prompt can impact probabilities will do a lot for improving the mental model of how LLM operate.

    Shameless self plug, but software which can do what I am describing is here, and it's worth noting that it ended up as peer reviewed research.

    [1] https://github.com/Hellisotherpeople/Constrained-Text-Genera...

  • Ask HN: How training of LLM dedicated to code is different from LLM of β€œtext”
    3 projects | news.ycombinator.com | 2 Oct 2023
    Yeah, the LLM outputs a distribution of likely next tokens. It is up to the decoder to select one, and it can use a grammar to enforce certain rules on the output. https://github.com/Hellisotherpeople/Constrained-Text-Genera... or https://github.com/ggerganov/llama.cpp/blob/master/grammars/... for example.
  • Show HN: LLMs can generate valid JSON 100% of the time
    25 projects | news.ycombinator.com | 14 Aug 2023
  • Llama: Add Grammar-Based Sampling
    7 projects | news.ycombinator.com | 21 Jul 2023
    I am in love with this, I tried my hand at building a Constrained Text Generation Studio (https://github.com/Hellisotherpeople/Constrained-Text-Genera...), and got published at COLING 2022 for my paper on it (https://paperswithcode.com/paper/most-language-models-can-be...), but I always knew that something like this or the related idea enumerated in this paper: https://arxiv.org/abs/2306.03081 was the way to go.
  • LLMs are too easy to automatically red team into toxicity
    2 projects | news.ycombinator.com | 3 Jul 2023
    It's far too easy to destroy any type of RLHF done to try to prevent bad behavior from an LLM.

    For example, if you want a LLM to generate things that look like social security numbers, you may try to prompt it asking for social security numbers. It will of course give you "I'm sorry hal I can't do that..."

    Then start using a technique like token filtering/filter assisted decoding, to make it where the LLM can only generate hyphens and numbers, and suddenly it does what you ask despite RLHF

    I explored this a tiny bit in the later sections of my paper studying what happens when you restrict an LLMs vocabulary: https://aclanthology.org/2022.cai-1.pdf#page=17

    You can even play with this with open source models using CTGS: https://github.com/Hellisotherpeople/Constrained-Text-Genera...

  • Understanding GPT Tokenizers
    10 projects | news.ycombinator.com | 8 Jun 2023
    I agree with you, and I'm SHOCKED at how little work there actually is in phonetics within the NLP community. Consider that most of the phonetic tools that I am using to enforce rhyming or similar syntactic constrained in constrained text generation studio (https://github.com/Hellisotherpeople/Constrained-Text-Genera...) were built circa 2014, such as the CMU rhyming dictionary. In most cases, I could not find better modern implementations of these tools.

    I did learn an awful lot about phonetic representations and matching algorithms. Things like "soundex" and "double metaphone" now make sense to me and are fascinating to read about.

  • Don Knuth Plays with ChatGPT
    6 projects | news.ycombinator.com | 20 May 2023
    https://github.com/hellisotherpeople/constrained-text-genera...

    Just ban the damn tokens and try again. I wish that folks had more intuition around tokenization, and why LLMs struggle to follow syntactic, lexical, or phonetic constraints.

  • Constrained Text Generation Studio
    1 project | news.ycombinator.com | 16 May 2023

What are some alternatives?

When comparing sketch and Constrained-Text-Generation-Studio you can also consider the following projects:

RasaGPT - πŸ’¬ RasaGPT is the first headless LLM chatbot platform built on top of Rasa and Langchain. Built w/ Rasa, FastAPI, Langchain, LlamaIndex, SQLModel, pgvector, ngrok, telegram

Constrained-Text-Genera

lmql - A language for constraint-guided and efficient LLM programming.

guidance - A guidance language for controlling large language models.

gpt_index - LlamaIndex (GPT Index) is a project that provides a central interface to connect your LLM's with external data. [Moved to: https://github.com/jerryjliu/llama_index]

torch-grammar

pandas-ai - Chat with your database (SQL, CSV, pandas, polars, mongodb, noSQL, etc). PandasAI makes data analysis conversational using LLMs (GPT 3.5 / 4, Anthropic, VertexAI) and RAG.

agency - Agency: Robust LLM Agent Management with Go

langchain - ⚑ Building applications with LLMs through composability ⚑ [Moved to: https://github.com/langchain-ai/langchain]

llama-tokenizer-js - JS tokenizer for LLaMA and LLaMA 2

rasa - πŸ’¬ Open source machine learning framework to automate text- and voice-based conversations: NLU, dialogue management, connect to Slack, Facebook, and more - Create chatbots and voice assistants

outlines - Structured Text Generation