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

Back prop from scratch 2022-10-12

ok [[my backprop SGD from scratch 2022-Aug]] looking over results from last time, indeed so strange how microbatch loss was going back and forth and eventually trending that the plot of my change in loss, is increasing. deltas = [x["loss_after"] - x["loss_before"] for x in metrics["micro_batch_updates"]] although initially the values were some negatives, as well. But I wonder does it indeed something is terribly wrong if this number ever goes up at all?...

October 12, 2022 · (updated February 26, 2023) · 7 min · 1280 words · Michal Piekarczyk