Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add baseline DSPy implementation #7

Merged
merged 7 commits into from
Apr 9, 2024
Merged

Add baseline DSPy implementation #7

merged 7 commits into from
Apr 9, 2024

Conversation

yoomlam
Copy link
Collaborator

@yoomlam yoomlam commented Apr 2, 2024

Add baseline DSPy implementation

  • Start openhermes LLM using Ollama: ollama run openhermes (Install Ollama from https://ollama.ai/)
  • Run:
pip install -r requirements.txt
python dspy_engine.py

Note the DSPy prompt is not yet optimized ("compiled" in DSPY parlance). Waiting on better retrieval results.

@yoomlam yoomlam changed the base branch from main to yoom/parameterize-using-env April 2, 2024 21:05
Base automatically changed from yoom/parameterize-using-env to main April 3, 2024 14:53
@yoomlam yoomlam force-pushed the yoom/dspy branch 6 times, most recently from bd38541 to f1ad816 Compare April 4, 2024 18:07
@ccheng26
Copy link
Collaborator

ccheng26 commented Apr 9, 2024

Adding a clean up function for the embeddings issue with chromadb while testing would be helpful
chromadb.errors.InvalidDimensionException: Embedding dimension 384 does not match collection dimensionality 768

@yoomlam
Copy link
Collaborator Author

yoomlam commented Apr 9, 2024

Adding a clean up function for the embeddings issue with chromadb while testing would be helpful chromadb.errors.InvalidDimensionException: Embedding dimension 384 does not match collection dimensionality 768

By "clean up", do you mean delete the chromadb folder? If so, I'm hesitant to be deleting any DB automatically in code. I think it's easy enough to run rm -rf chroma_db on the commandline before testing, e.g., rm -rf chroma_db && python dspy_engine.py. With that said, I don't expect to delete the DB at all while testing DSPy -- I only delete the DB when testing different embedding/retrieval parameters.

@ccheng26
Copy link
Collaborator

ccheng26 commented Apr 9, 2024

Adding a clean up function for the embeddings issue with chromadb while testing would be helpful chromadb.errors.InvalidDimensionException: Embedding dimension 384 does not match collection dimensionality 768

By "clean up", do you mean delete the chromadb folder? If so, I'm hesitant to be deleting any DB automatically in code. I think it's easy enough to run rm -rf chroma_db on the commandline before testing, e.g., rm -rf chroma_db && python dspy_engine.py. With that said, I don't expect to delete the DB at all while testing DSPy -- I only delete the DB when testing different embedding/retrieval parameters.

I suppose cleaning up the collections won't be as necessary in this file as we're not swapping embeddings often when testing, but if we do plan on integrating this with the chatbot we should have some option delete the files as opposed to doing this everytime.

@yoomlam yoomlam merged commit 4a66abe into main Apr 9, 2024
2 checks passed
@yoomlam yoomlam deleted the yoom/dspy branch April 9, 2024 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants