Phi-3CookBook
Phi-3CookBook copied to clipboard
Phi-3 produces random gibberish
Hi all, thanks a lot for this great repo! I am a beginner in the field and I started playing with Phi-3 and so far I've been quite impressed. I am not sure this is the place to discuss the issue I am having, in case please redirect me to a more appropriate place.
My problem is that it is very easy to trigger Phi-3 to start throwing a super long and random amount of words instead as answer to easy question.
Let's take this example of conversation:
**Me**: what is a rainbow?
**Phi3**: A rainbow is a meteorological phenomenon that is caused by reflection, refraction, and dispersion of light in water droplets resulting in a spectrum of colors appearing in the sky. It takes the form of a multicolored arc. Rainbows caused by sunlight always appear opposite the sun. The primary rainbow is caused by one set of reflections inside water droplets, whereas a secondary rainbow is caused by two sets of internal reflections.
Rainbows are formed when the sun shines onto droplets of moisture in the Earth's atmosphere. The light is refracted as it enters the droplet, reflects off the back of the droplet, and is refracted again as it exits the droplet. This double refraction causes the light to spread out into a spectrum of colors, which we see as a rainbow.
The colors of the rainbow, in order, are red, orange, yellow, green, blue, indigo, and violet. This sequence is often remembered by the acronym ROYGBIV. The colors are a result of the different wavelengths of light being refracted by different amounts. Red light is refracted the least, while violet light is refracted the most.
Rainbows are always seen as a circular arc, but the ground prevents us from seeing the full circle. The size and shape of a rainbow depend on the position of the sun, the observer, and the raindrops. The most common type of rainbow is a primary rainbow, which is the brightest and has the most saturated colors. A secondary rainbow, which is fainter and has colors that are reversed, can also be seen under certain conditions.
Rainbows are not only a beautiful natural phenomenon but also a symbol of hope and goodwill. They have been the subject of myths, legends, and art throughout human history.
**Me**: tell me one of those legends
**Phi3**: One of the most famous legends associated with rainbows is the story of the "Chasing the Rainbow" from Irish folklore. According to the legend, there is a magical pot of gold hidden at the end of a rainbow. The pot is said to be guarded by a leprechaun, a type of fairy in Irish mythology. The leprechaun is known for his cunning and trickery, and he will do anything to protect his treasure.
The legend tells that if a person manages to catch the pot of gold at the end of the rainbow, the leprechaun will grant them three wishes. However, the leprechaun is also known for his cleverness and will try to outwit the person chasing the pot. The story has been popularized in various forms of literature, movies, and television shows, and it has become a symbol of the elusive nature of rainbows and the idea of an unattainable treasure.
While the story of the pot of gold at the end of the rainbow is not based on factual evidence, it has become an enduring part of folklore and has contributed to the mystical and enchanting aura surrounding rainbows.
**Me**: what is a leprechaun?
**Phi3**: A leprechaun is a mythical creature from Irish folklore, often depicted as a small, mischievous, and solitary figure. Leprechauns are commonly associated with the Irish tradition of St. Patrick's Day and are said to be skilled in the art of shoemaking. They are also known for their magical powers and their ability to grant wishes.
Leprechauns are typically described as having the following characteristics:
1. Small stature: Leprechauns are often portrayed as being around 3 to 4 feet tall, which is significantly shorter than the average human height.
2. Green clothing: They are usually depicted wearing a green suit, which is a nod to Ireland's nickname, "The Emerald Isle."
3. Bearded: Leprechauns are often shown with a long, pointed beard, which is a common feature in their portrayal.
4. Pointed hat: They are frequently depicted wearing a tall, conical hat, which is sometimes referred to as a "leprechaun's hat" or "pointed hat."
5. Shoemaking: Leprechauns are renowned for their shoemaking skills, and it is said that they can mend shoes in a single night.
6. Magical powers: Leprechauns are believed to possess magical abilities, such as the power to create illusions, shape-shift, and grant wishes.
7. Hidden treasure: One of the most famous aspects of leprechaun folklore is the idea that they hoard a pot of gold at the end of a rainbow. Legends say that if a leprechaun is caught, he will grant the captor three wishes in exchange for his freedom.
8. Solitary nature: Leprechauns are often depicted as solitary creatures who prefer to live in hidden caves or underground dwellings.
Despite their popularity in folklore and popular culture, leprechauns are not considered to be real creatures. They are part of the rich tapestry of Irish mythology and have been embraced as a symbol of Irish heritage and folklore.
**Me**: tell me more about this mythology
**Phi3**: Irish mythology is a rich and diverse collection of stories, legends, and folklore that has been passed down through generations in Ireland. It encompasses a wide range of mythological beings, including gods, goddesses, heroes, and magical creatures. The mythology is deeply intertwined with the country's history, culture, and beliefs, and it continues to influence literature, art, and popular culture today.
Some of the key elements and themes of Irish mythology include:
1. The Tuatha Dé Danann: The Tuatha Dé Danann were a group of god-like beings who were believed to have once ruled Ireland. They were said to possess great magical powers and were associated with various aspects of life, such as war, love, and the natural world.
2. The Fomorians: The Fomorians were a race of supernatural beings who were considered to be the enemies of the Tuatha Dé Danann. They were often portrayed as dark and malevolent, and their stories often involved battles and conflicts with the Tuatha Dé Danann.
3. The Dagda: The Dagda was a powerful god in Irish mythology, known for his strength, wisdom, and magical abilities. He was often depicted as a large, burly figure with a club, which he used to protect and provide for his people.
4. The Morrígan: The Morrígan was a goddess of war and fate, who was said to have the power to influence the outcome of battles. She was often portrayed as a shape-shifting figure, taking on various forms, such as a crow, a wolf, or a horse.
5. The Sidhe: The Sidhe, also known as the "fairies" or "the good people," were a race of supernatural beings who lived in hidden realms beneath the earth or in the otherworld. They were often associated with nature, magic, and the supernatural.
6. The Aos Sí: The Aos Sí were a group of supernatural beings who were believed to be the ancestors of the Tuatha Dé Danann. They were said to possess great magical powers and were often associated with the natural world, such as forests, mountains, and rivers.
7. The Celtic Pantheon: The Celtic pantheon was a collection of gods and goddesses who were worshipped by the ancient Celts. These deities were often associated with natural elements, such as the sun, the moon, the sea, and the earth.
8. Legendary Heroes: Irish mythology is also known for its legendary heroes, such as Cú Chulainn, Fionn mac Cumhaill, and Oisín. These heroes were often depicted as brave and noble figures who embarked on epic quests and battles, and their stories have been passed down through generations.
9. The Tales of the Ulster Cycle: The Ulster Cycle is a collection of ancient Irish stories that revolve around the heroic exploits of the legendary characters, such as Cú Chulainn and the warriors of the Ulster kingdom. These tales often involve battles, love, and the supernatural.
10. The Tales of the Mabinogi: The Mabinogi is a collection of ancient Irish stories that focus on the lives and adventures of the legendary characters, such as Pwyll, Branwen, and Manannán. These tales often explore themes of love, loyalty, and the supernatural.
Irish mythology is a fascinating and complex tapestry of stories, characters, and beliefs that have captivated the imagination of people for centuries. It continues to inspire and influence literature, art, and popular culture, and it remains an essential part of Ireland's rich cultural heritage.
**Me**: can you tell me more about ireland in general?
**Phi3**: Ireland, officially known as the Republic of Ireland, is a country located in north-western Europe. It is an island in the North Atlantic Ocean, and it shares its only land border with the Republic of Northern Ireland. Ireland is the third-largest island on Earth, and it is the twentieth-most populous island in the world.
Geographically, Ireland is divided into four provinces: Connacht, Leinster, Munster, and Ulster. The island is divided into 32 counties, each of which is a county. The capital city of Ireland is Dublin. Ireland is a member of the European Union. The island is a country with a rich history, and it is a country with a temperate climate. Ireland is a country with a temperate climate. Ireland is a country with a temperate climate. Ireland is a country with a temperate climate. Ireland is a country with a temperate climate. Ireland is a country with a temperate climate. Ireland is a country with a country with a temperate climate. Ireland is a country with a country with a country with a country with a country with a country with a country with a to the answer theater with a country with a to the answer to a country with a to the rain with a toaster, and rain to a rain, a of the rain, a rain, and a rain, and theater. Theater. The Sun to-rain, the, rain and a rain, and a rain. The rain. The answer, and a rain, a the rain, rain, the rain, the rain, rain, and theater. The rain, andray, rain. The rain. The sunlight.rain. Thedrop.ells when. Rainbow. This,drop when,RAAC when,ray refracts the rain. The rain. Refracted drop. rain. This. This,ray, while the sun. sun. The raind. sun.
.at. Theorizontal.com,in rain.com,ats, rainer,view. The sun to clarify. The sun,angle, light in the, refract,com shape, androof,ation,cometing,ade,coming,comets,comble,comet ascrip,comet,ray,incurtaining,unsafie-angique, doubled,andangement to see-drower, andangling and,ray, andray,ray,ells, andray,vapling,andlake,ells, the same (orangling butament,s, theater, theorifies of theta,ondess of rain,oressessing. rain,ographing angle,sandessions,kyangling,andessing,ensourse rays,oultess,entrix,hes,enship,in the angle,oranging when the same, the angle, the same againens,inside andangel,angually,ature,angess, seen, theater, the same, the same, the arrows,like, (
yragens the sky when theatered in theatering theater,ing, theater,comatically,hing
theater (theater,comad, of the rain, of the ?.
of theatrix,otic andangling and-theater,angel, mirroring,ologen,angie (theatered,
of a mirrored
attered ?angewellow to theologangets, ounter
color of (the angleomatches, theater,angel of a little,angewewelangarsang,angang and theologape ofangomangewangang ( (of whichologarang, (theaterangagunscapeangagunituarizes,orangessing in a ltheateromagounassaqueatheathangounisangnimersagindisielding, in theangisang of the sameingessangiversomulting the spectrumofagiewing reledess the the
atleledispecie, and by the same,ingiewing, the same, of the lighting,elle, theajing, the of the sameangess of the second of the sameangielding (
ednimultoothiqueatagunige of the lighting etherfield ountereuteilistaratter reflectarighting ethering, of -aging - -horinge, theewling ouparunt, the ounatangomathelateromagnear ringshovershoangnimituled, ttering andnimomsagargun, inangewarchesarches,-arangessions ouns, the leastangangangs, lightoweest.estarches, the same, (the same wave, the, with, -deading,angoun Bouness,ess inside of
inside of the, -lighting,ess,
inside,elighting
inside, inside lighting inside,,inging, the to the aring, "bust, the souangang from the same, by
the
through,, inside, inside inside, inside, the next, then, then, then, by
the
in the (the
the the factou
(p (fews, in the following, the reflected
quearc, ,
bright, the same,brow 1. 1ho 2ing drihold, of -the ho horeu
ing -
agr f again the the aging, in the whole of of 32oval
divisovor, the 3oagagift, (prisitu, (the boguging, the and to the most
the unomowe the, bring the the the same, andque the second the brighting, it ashing, and ndowologs, and, however, theatering, gowe, it the same ofthe the least the leastledsunding-theing.,,ing the most the mostog -youinging the most of the same-ming of the same, the same the factagouarking,, the next, the least the light, the broken
the mowe, or, andagusting, in theedewe-youingewingewing youhingingingingled,inginginting the the least the inner-theagouagagagagething, andumsandagique,souled, theled-the least the least the lighting-the in theatering, of the mostingledestagest of the leastingledarowe, the most the most the most the most the most the most, the following the following as the most theatered by the mostingsand and, andingingled, and theing and brighting of thisinginging theing of the differentingleding, the reflected by themingleding by theingleds iningingledewelding as youledugledsugoging of the brighting and least by the least the by the byogewewledledled by the second the by the topuging, the by this by least by the sameugug (theing, the by the by itledingledinging, of course of brighting, the subjectingleds (inlediqueled in the by the least theaterheheitingingledledugingheholding andtheledsituledlediqueledledledledledledheofheledledledleds of tleding, by sledionable-theingledisled by ahingledledledledledledledledledit,andledledledledledledledledledledestewestledledleduledledledledledinging, andscaledledledsandinguminges, andingingingingingingingingingingingledots, theledingusingledisanging, andselding, in the inledinging, andtheable,theable, ands,anding, andsandinginginginging, and the of the the the theable, andtheeyerand, and the as itle, ands, the least the most bys-theing,anding as iting intheestu, the
inararthearbytheledarooting the least to the most to me to bytopest of the most to beowe to besanding
theing, and which the most the byleants, as by different by the most of this aknowns andtheobles, andle, andle, inthele, inthebeing,the
As you can see the last answer is pure garbage. This is my last full prompt:
<|system|>
You are an AI assistant that helps people find information. <|end|>
<|user|>what is a rainbow?<|end|>
<|assistant|> A rainbow is a meteorological phenomenon that is caused by reflection, refraction, and dispersion of light in water droplets resulting in a spectrum of colors appearing in the sky. It takes the form of a multicolored arc. Rainbows caused by sunlight always appear opposite the sun. The primary rainbow is caused by one set of reflections inside water droplets, whereas a secondary rainbow is caused by two sets of internal reflections.
Rainbows are formed when the sun shines onto droplets of moisture in the Earth's atmosphere. The light is refracted as it enters the droplet, reflects off the back of the droplet, and is refracted again as it exits the droplet. This double refraction causes the light to spread out into a spectrum of colors, which we see as a rainbow.
The colors of the rainbow, in order, are red, orange, yellow, green, blue, indigo, and violet. This sequence is often remembered by the acronym ROYGBIV. The colors are a result of the different wavelengths of light being refracted by different amounts. Red light is refracted the least, while violet light is refracted the most.
Rainbows are always seen as a circular arc, but the ground prevents us from seeing the full circle. The size and shape of a rainbow depend on the position of the sun, the observer, and the raindrops. The most common type of rainbow is a primary rainbow, which is the brightest and has the most saturated colors. A secondary rainbow, which is fainter and has colors that are reversed, can also be seen under certain conditions.
Rainbows are not only a beautiful natural phenomenon but also a symbol of hope and goodwill. They have been the subject of myths, legends, and art throughout human history.<|end|>
<|user|>tell me one of those legends<|end|>
<|assistant|> One of the most famous legends associated with rainbows is the story of the "Chasing the Rainbow" from Irish folklore. According to the legend, there is a magical pot of gold hidden at the end of a rainbow. The pot is said to be guarded by a leprechaun, a type of fairy in Irish mythology. The leprechaun is known for his cunning and trickery, and he will do anything to protect his treasure.
The legend tells that if a person manages to catch the pot of gold at the end of the rainbow, the leprechaun will grant them three wishes. However, the leprechaun is also known for his cleverness and will try to outwit the person chasing the pot. The story has been popularized in various forms of literature, movies, and television shows, and it has become a symbol of the elusive nature of rainbows and the idea of an unattainable treasure.
While the story of the pot of gold at the end of the rainbow is not based on factual evidence, it has become an enduring part of folklore and has contributed to the mystical and enchanting aura surrounding rainbows.<|end|>
<|user|>what is a leprechaun?<|end|>
<|assistant|> A leprechaun is a mythical creature from Irish folklore, often depicted as a small, mischievous, and solitary figure. Leprechauns are commonly associated with the Irish tradition of St. Patrick's Day and are said to be skilled in the art of shoemaking. They are also known for their magical powers and their ability to grant wishes.
Leprechauns are typically described as having the following characteristics:
1. Small stature: Leprechauns are often portrayed as being around 3 to 4 feet tall, which is significantly shorter than the average human height.
2. Green clothing: They are usually depicted wearing a green suit, which is a nod to Ireland's nickname, "The Emerald Isle."
3. Bearded: Leprechauns are often shown with a long, pointed beard, which is a common feature in their portrayal.
4. Pointed hat: They are frequently depicted wearing a tall, conical hat, which is sometimes referred to as a "leprechaun's hat" or "pointed hat."
5. Shoemaking: Leprechauns are renowned for their shoemaking skills, and it is said that they can mend shoes in a single night.
6. Magical powers: Leprechauns are believed to possess magical abilities, such as the power to create illusions, shape-shift, and grant wishes.
7. Hidden treasure: One of the most famous aspects of leprechaun folklore is the idea that they hoard a pot of gold at the end of a rainbow. Legends say that if a leprechaun is caught, he will grant the captor three wishes in exchange for his freedom.
8. Solitary nature: Leprechauns are often depicted as solitary creatures who prefer to live in hidden caves or underground dwellings.
Despite their popularity in folklore and popular culture, leprechauns are not considered to be real creatures. They are part of the rich tapestry of Irish mythology and have been embraced as a symbol of Irish heritage and folklore.<|end|>
<|user|>tell me more about this mythology<|end|>
<|assistant|> Irish mythology is a rich and diverse collection of stories, legends, and folklore that has been passed down through generations in Ireland. It encompasses a wide range of mythological beings, including gods, goddesses, heroes, and magical creatures. The mythology is deeply intertwined with the country's history, culture, and beliefs, and it continues to influence literature, art, and popular culture today.
Some of the key elements and themes of Irish mythology include:
1. The Tuatha Dé Danann: The Tuatha Dé Danann were a group of god-like beings who were believed to have once ruled Ireland. They were said to possess great magical powers and were associated with various aspects of life, such as war, love, and the natural world.
2. The Fomorians: The Fomorians were a race of supernatural beings who were considered to be the enemies of the Tuatha Dé Danann. They were often portrayed as dark and malevolent, and their stories often involved battles and conflicts with the Tuatha Dé Danann.
3. The Dagda: The Dagda was a powerful god in Irish mythology, known for his strength, wisdom, and magical abilities. He was often depicted as a large, burly figure with a club, which he used to protect and provide for his people.
4. The Morrígan: The Morrígan was a goddess of war and fate, who was said to have the power to influence the outcome of battles. She was often portrayed as a shape-shifting figure, taking on various forms, such as a crow, a wolf, or a horse.
5. The Sidhe: The Sidhe, also known as the "fairies" or "the good people," were a race of supernatural beings who lived in hidden realms beneath the earth or in the otherworld. They were often associated with nature, magic, and the supernatural.
6. The Aos Sí: The Aos Sí were a group of supernatural beings who were believed to be the ancestors of the Tuatha Dé Danann. They were said to possess great magical powers and were often associated with the natural world, such as forests, mountains, and rivers.
7. The Celtic Pantheon: The Celtic pantheon was a collection of gods and goddesses who were worshipped by the ancient Celts. These deities were often associated with natural elements, such as the sun, the moon, the sea, and the earth.
8. Legendary Heroes: Irish mythology is also known for its legendary heroes, such as Cú Chulainn, Fionn mac Cumhaill, and Oisín. These heroes were often depicted as brave and noble figures who embarked on epic quests and battles, and their stories have been passed down through generations.
9. The Tales of the Ulster Cycle: The Ulster Cycle is a collection of ancient Irish stories that revolve around the heroic exploits of the legendary characters, such as Cú Chulainn and the warriors of the Ulster kingdom. These tales often involve battles, love, and the supernatural.
10. The Tales of the Mabinogi: The Mabinogi is a collection of ancient Irish stories that focus on the lives and adventures of the legendary characters, such as Pwyll, Branwen, and Manannán. These tales often explore themes of love, loyalty, and the supernatural.
Irish mythology is a fascinating and complex tapestry of stories, characters, and beliefs that have captivated the imagination of people for centuries. It continues to inspire and influence literature, art, and popular culture, and it remains an essential part of Ireland's rich cultural heritage.<|end|>
<|user|>can you tell me more about ireland in general?<|end|>
<|assistant|>
My question for you is: am I doing something wrong on my side, in terms of usage of Phi-3 or preparation of the prompt?
I am giving back in the prompt also the history of the conversation as done in this project : https://github.com/microsoft/Phi3-Chat-WinUI3-Sample/tree/main/ChatAppGenAI
I prepared a small repo where you can check the project I am using: https://github.com/LoriBru/Phi-3SimpleChat
Thank you for your help!