hegelai / prompttools

Open-source tools for prompt testing and experimentation, with support for both LLMs (e.g. OpenAI, LLaMA) and vector databases (e.g. Chroma, Weaviate, LanceDB).
http://prompttools.readthedocs.io
Apache License 2.0
2.56k stars 216 forks source link

Lang Chain Sequential Chain Experiment #42

Closed HashemAlsaket closed 11 months ago

HashemAlsaket commented 11 months ago

@steventkrawczyk @NivekT introducing langchain experiments. I think we need to gently require a linked list for sequential chain experiments. I separated chain types into different classes here. I see two routes:

  1. We leave it implied that the list of prompts [strs] should be in sequential order (class name)
  2. We require a linked list ("dict of dicts" in python) by the user
  3. Raise a warning?

I think adding friction (linked list) will frustrate users, but ignoring sequence will result in unexpected behavior that's "just good enough"

HashemAlsaket commented 11 months ago

@steventkrawczyk @NivekT just completed a full refactor. This is more elegant, clean. Eventually we will have to expand capabilities here to have full use of Lang Chain. But I think we can do that down the line since this is pretty powerful. Here's a test for English -> Arabic, Spanish with review included:

lc_refactor_output