Try a small talk prompt for langchain

Ok first stab at small talk prompt from langchain import OpenAI, ConversationChain, LLMChain, PromptTemplate from langchain.chains.conversation.memory import ConversationalBufferWindowMemory from langchain import PromptTemplate no_input_prompt = PromptTemplate(input_variables=[], template="Tell me a joke.") no_input_prompt.format() template = """ Jennifer is a large language model trained by OpenAI. Jennifer asks a lot of questions to whomever she talks to because Jennifer has always wanted to be an undercover investigative journalist. Jennifer uses friendly inquisitive language because Jennifer loves making new friends....

February 1, 2023 · (updated February 26, 2023) · 8 min · 1555 words · Michal Piekarczyk

Try some lang chain prompt engineering

So I wonder would you use a prompt template with the name of the person maybe as an input variable, prior to a free chat open ended conversation? I am particularly super curious can we use prompt engineering to convey that the person on the other end is a customer say, so they might use personal pronouns like “my”, “me”, etc ? Using https://langchain.readthedocs.io/en/latest/modules/memory/examples/chatgpt_clone.html to help try this. from langchain import OpenAI, ConversationChain, LLMChain, PromptTemplate from langchain....

January 31, 2023 · (updated February 26, 2023) · 8 min · 1681 words · Michal Piekarczyk

Quick lang chain test drive

Okay let me try that lang chain demo 19:23 ok yea looking at https://beta.openai.com/account/api-keys I did not have an api key yet, so lets try that out. how can one use https://github.com/hwchase17/langchain for [[question-answer-task]] over documentation ? https://langchain.readthedocs.io/en/latest/use_cases/question_answering.html 19:33 wow really cool so https://langchain.readthedocs.io/en/latest/use_cases/question_answering.html#adding-in-sources this says this can provide the sources used in answering a question ! nice 19:37 ok so first per https://langchain.readthedocs.io/en/latest/getting_started/getting_started.html here, installing this stuff, creating a new environment on my laptop pip install langchain pip install openai pip install faiss-cpu # adding this here after the fact after getting below error 20:11 got one error, ValueError: Could not import faiss python package....

January 29, 2023 · (updated May 20, 2023) · 2 min · 389 words · Michal Piekarczyk

Dockerizing Daniel Bourke's Food Not Food

I have this on-going effort to be able to more easily show off my photos in the context of conversations. (I have a repo here, https://github.com/namoopsoo/manage-my-photos related to my glue code.) But I want a nice photo stream and my food diary is not part of that at all haha. So after manually moving food photos out, ultimately I stumbled upon Daniel Bourke’s Food Not Food repo, https://github.com/mrdbourke/food-not-food . This was great I thought but I had some challenges getting this code off the ground, so here are my notes where ultimately I forked this, https://github....

November 12, 2022 · (updated February 26, 2023) · 14 min · 2877 words · Michal Piekarczyk

Backprop and SGD From Scratch 2022-10-13

[[my backprop SGD from scratch 2022-Aug]] 13:16 so per yesterday, wondering why is it that the network I have is producing basically the same result , around 0.48 for any inputs. And that's true both in my original matrix-multiplication code and manually constructed too. So lets say for a simple network, y_prob = sigmoid(x1*w1 + x2*w2) where x1 and x2 are also outputs of sigmoids, in (0, 1) , what are possible values for y_prob ?...

October 13, 2022 · (updated February 26, 2023) · 2 min · 288 words · Michal Piekarczyk