avatarScott Anthony

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

7654

Abstract

-string">"product"</span>], template=<span class="hljs-string">"What is a good name for a company that makes {product}?"</span>,

<span class="hljs-built_in">print</span>(prompt.<span class="hljs-built_in">format</span>(product=<span class="hljs-string">"typing machines"</span>))

llm = OpenAI(temperature=<span class="hljs-number">0.9</span>) text = (prompt.<span class="hljs-built_in">format</span>(product=<span class="hljs-string">"typing machines"</span>)) <span class="hljs-built_in">print</span>(llm(text))</pre></div><p id="107e">⬇️ Notebook view:</p><figure id="8121"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*sNd-kSpCkaenSz159KjRuQ.png"><figcaption></figcaption></figure><p id="0e77">The following prototype is a good example of how LangChain can be used to automate prompt engineering, and leverage LLMs for conversational context:</p><div id="e533"><pre><span class="hljs-keyword">from</span> langchain.llms <span class="hljs-keyword">import</span> OpenAI <span class="hljs-keyword">from</span> langchain.chains <span class="hljs-keyword">import</span> ConversationChain <span class="hljs-keyword">from</span> langchain.chains.conversation.memory <span class="hljs-keyword">import</span> ConversationBufferMemory

llm = OpenAI(temperature=<span class="hljs-number">0</span>) conversation = ConversationChain( llm=llm, verbose=<span class="hljs-literal">True</span>, memory=ConversationBufferMemory() )

conversation.predict(<span class="hljs-built_in">input</span>=<span class="hljs-string">"Hi there!"</span>)</pre></div><p id="e3e8">Response:</p><div id="f542"><pre>> Entering new ConversationChain chain... Prompt after formatting: The following is a friendly conversation between a human and an AI. The AI is talkative and provides lots of specific details from its context. If the AI does not know the answer to a question, it truthfully says it does not know.

Current conversation:

Human: Hi there! AI:

> Finished chain. Hi there! It's nice to meet you. My name is AI. What's your name?</pre></div><p id="31b3">Input:</p><div id="3efb"><pre>conversation.predict(<span class="hljs-built_in">input</span>=<span class="hljs-string">"My name is Cobus"</span>)</pre></div><p id="1b3e">Response:</p><div id="8fca"><pre>> Entering new ConversationChain chain... Prompt after formatting: The following is a friendly conversation between a human and an AI. The AI is talkative and provides lots of specific details from its context. If the AI does not know the answer to a question, it truthfully says it does not know.

Current conversation:

Human: Hi there! AI: Hi there! It's nice to meet you. My name is AI. What's your name? Human: My name is Cobus AI:

> Finished chain. Nice to meet you, Cobus! What can I do for you today?</pre></div><p id="bcbb">This approach is not optimal for longer conversations as the prompt size sent to the LLM will just grow too big.</p><p id="fdcf">In this final example, the user is prompted for input and this is used to generate the response, it also illustrates how two chains are combined.</p><div id="f1bf"><pre>title = <span class="hljs-built_in">input</span>(<span class="hljs-string">'What is your title? '</span>) <span class="hljs-built_in">print</span> (<span class="hljs-string">'I have your title as '</span> + title)

era = <span class="hljs-built_in">input</span>(<span class="hljs-string">'Lasty, from what era should the text be? '</span>) <span class="hljs-built_in">print</span> (<span class="hljs-string">'I have your era as '</span> + era)

<span class="hljs-comment"># This is an LLMChain to write a synopsis given a title of a play and the era it is set in.</span> llm = OpenAI(temperature=<span class="hljs-number">.7</span>) template = <span class="hljs-string">"""You are a playwright. Given the title of play and the era it is set in, it is your job to write a synopsis for that title.

Title: {title} Era: {era} Playwright: This is a synopsis for the above play:"""</span> prompt_template = PromptTemplate(input_variables=[<span class="hljs-string">"title"</span>, <span class="hljs-string">'era'</span>], template=template) synopsis_chain = LLMChain(llm=llm, prompt=prompt_template, output_key=<span class="hljs-string">"synopsis"</span>)

<span class="hljs-comment"># This is an LLMChain to write a review of a play given a synopsis.</span> llm = OpenAI(temperature=<span class="hljs-number">.7</span>) template = <span class="hljs-string">"""You are a play critic from the New York Times. Given the synopsis of play, it is your job to write a review for that play.

Play Synopsis: {synopsis} Review from a New York Times play critic of the above play:"""</span> prompt_template = PromptTemplate(input_variables=[<span class="hljs-string">"synopsis"</span>], template=template) review_chain = LLMChain(llm=llm, prompt=prompt_template, output_key=<span class="hljs-string">"review"</span>)

<span class="hljs-comment"># This is the overall chain where we run these two chains in sequence.</span> <span class="hljs-keyword">from</span> langchain.chains <span class="hljs-keyword">import</span> SequentialChain overall_chain = SequentialChain( chains=[synopsis_chain, review_chain], input_variables=[<span class="hljs-string">"era"</span>, <span class="hljs-string">"title"</span>], <span class="hljs-comment"># Here we return multiple variables</span> output_variables=[<span class="hljs-string">"synopsis"</span>, <span class="hljs-string">"review"</span>], verbose=<span class="hljs-literal">True</span>)

review = overall_chain({<span class="hljs-string">"title"</span>:title, <span class="hljs-string">"era"</span>: era}) <span class="hljs-built_in">print</span> (review)</pre></div><p id="bc8d">And the output:</p><div id="b537"><pre>> Entering new SequentialChain chain...

> Finished chain. {'title': 'Tragedy at sunset on the beach', 'era': 'Victorian ', 'synopsis': "\n\nTragedy at Sunset on the Beach is set in the Victorian era and tells the story of a young girl, Amelia, whose search for love and happiness leads her to a fateful encounter with a mysterious stranger on the beach at sunset. While walking along the shore, Amelia meets a man named William, who presents her with a rose as a symbol of his affection. Though she initially resists his advances, Amelia eventually finds herself drawn to William and the two quickly grow close. \n\nHowever, as the sun sets, a secret from William's past is revealed that changes everything. It turns out that William is a wanted criminal and is being pursued by the police. After a tense confrontation, William is arrested and taken away, leaving Amelia heartbroken and alone.\n\nIn the aftermath of their chance encounter, Amelia is forced to grapple with the tragedy of her unrequited love, and the harsh realities of life. Her journey serves as a reminder that love isn't always as simple and straightforward as it may seem.", 'review': '\n\nTragedy at Sunset on the Beach is a captivating tale of love, loss, and the power of the human spirit. The set in the Victorian era allows for a unique perspective on the themes of the story, and the performance by the cast is truly remarkable.\n\nThe story follows Amelia, a young girl whose search for love and happiness leads her to a fateful encounter with a mysterious stranger on the beach at sunset. We watch as Amelia’s relationship with the stranger, William, develops and evolves, only to be cut short when a secret from his past is revealed. This revelation forces Amelia to confront the harsh realities of life and the tragedy of her unrequited love.\n\nThe play is a thought-p

Options

rovoking exploration of love, sacrifice, and the power of human connection. It’s a story that is sure to resonate with audiences who are looking for a story of love, loss, and hope. Highly recommended.'}</pre></div><h1 id="e5a3">In Conclusion</h1><p id="2a02">In the recent past, I have written a number of times on the coming fragmentation and that a single contained Conversational AI framework will not suffice.</p><p id="43a6">Already we are seeing that LLMs are forcing traditional chatbot framework providers to look out ward to technologies they should make provision for.</p><p id="e321">LangChain is software that fills a critical voice which currently exists to make LLMs more conversational.</p><p id="b240"><b><i>⭐️ Please follow me on <a href="https://www.linkedin.com/in/cobusgreyling/">LinkedIn</a> for updates on Conversational AI ⭐️</i></b></p><figure id="10d2"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*lIm_TXh6TC9uGn63lOjZtQ.png"><figcaption></figcaption></figure><p id="42a0"><i>I’m currently the <a href="https://www.linkedin.com/in/cobusgreyling">Chief Evangelist</a> @ <a href="https://www.humanfirst.ai">HumanFirst</a>. I explore and write about all things at the intersection of AI and language; ranging from <a href="https://cobusgreyling.medium.com/the-large-language-model-landscape-9da7ee17710b">LLMs</a>, <a href="https://cobusgreyling.medium.com/the-five-categories-of-conversational-ai-f2410beeaf2f">Chatbots</a>, <a href="https://cobusgreyling.medium.com/three-key-voicebot-design-considerations-7bf25444dfec">Voicebots</a>, Development Frameworks, <a href="https://cobusgreyling.medium.com/testing-complex-utterances-with-the-co-here-humanfirst-integration-145ab4eedd84">Data-Centric latent spaces</a> and more.</i></p><div id="02f7" class="link-block"> <a href="https://www.humanfirst.ai"> <div> <div> <h2>NLU design tooling</h2> <div><h3>“Conversation Designer, Retail, 10k+ employees The tool that turned conversation designers, into NLU designers” ★★★★★…</h3></div> <div><p>www.humanfirst.ai</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*lgMaRGTU1PRX4MB7)"></div> </div> </div> </a> </div><figure id="7278"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*qPfFI9uFl04n1ZUywxH38w.png"><figcaption></figcaption></figure><figure id="9789"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*mwQw4LOeZdWG1AD8RDheXw.jpeg"><figcaption><a href="https://www.linkedin.com/in/cobusgreyling">https://www.linkedin.com/in/cobusgreyling</a></figcaption></figure><figure id="bcbe"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*qPfFI9uFl04n1ZUywxH38w.png"><figcaption></figcaption></figure><div id="525b" class="link-block"> <a href="https://cobusgreyling.medium.com/subscribe"> <div> <div> <h2>Get an email whenever Cobus Greyling publishes.</h2> <div><h3>Get an email whenever Cobus Greyling publishes. By signing up, you will create a Medium account if you don’t already…</h3></div> <div><p>cobusgreyling.medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*jN8P0LRxgRrefLMK)"></div> </div> </div> </a> </div><div id="b7d5" class="link-block"> <a href="https://eliza.community"> <div> <div> <h2>Eliza Language Technology Community — Language Technology: Conversational AI, NLP/NLP, CCAI…</h2> <div><h3>ELIZA — Where language technology enthusiasts unite.</h3></div> <div><p>eliza.community</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*yM6mui4LoM4fDMPx)"></div> </div> </div> </a> </div><div id="63e6" class="link-block"> <a href="https://cobusgreyling.medium.com/the-cobus-quadrant-of-nlu-design-4b1654f21d70"> <div> <div> <h2>The Cobus Quadrant™ Of NLU Design</h2> <div><h3>NLU design is vital to planning and continuously improving Conversational AI experiences.</h3></div> <div><p>cobusgreyling.medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/1*yLwyX_HKYjwqFY0IkmesCw.png)"></div> </div> </div> </a> </div><div id="e342" class="link-block"> <a href="https://cobusgreyling.medium.com/the-cobus-quadrant-of-conversation-design-capabilities-9a28c23409cd"> <div> <div> <h2>The Cobus Quadrant™ Of Conversation Design Capabilities</h2> <div><h3>∗ This is part one of a two part series, please also take a look part two, the Cobus Quadrant of NLU Design.</h3></div> <div><p>cobusgreyling.medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/1*xdvS5qYcZsxll7FEUWRitA.png)"></div> </div> </div> </a> </div><div id="198e" class="link-block"> <a href="https://chat.langchain.dev/"> <div> <div> <h2>LangChain Chat</h2> <div><h3>LangChain documentation chatbot</h3></div> <div><p>chat.langchain.dev</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/)"></div> </div> </div> </a> </div><figure id="a944"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*qPfFI9uFl04n1ZUywxH38w.png"><figcaption></figcaption></figure><div id="8473" class="link-block"> <a href="https://github.com/hwchase17/langchain"> <div> <div> <h2>GitHub - hwchase17/langchain: ⚡ Building applications with LLMs through composability ⚡</h2> <div><h3>⚡ Building applications with LLMs through composability ⚡ pip install langchain Large language models (LLMs) are…</h3></div> <div><p>github.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*JB0ci66QVXXsDtm8)"></div> </div> </div> </a> </div><div id="1e65" class="link-block"> <a href="https://langchain.readthedocs.io/"> <div> <div> <h2>Welcome to LangChain</h2> <div><h3>Large language models (LLMs) are emerging as a transformative technology, enabling developers to build applications…</h3></div> <div><p>langchain.readthedocs.io</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/)"></div> </div> </div> </a> </div><figure id="8d81"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*qPfFI9uFl04n1ZUywxH38w.png"><figcaption></figcaption></figure></article></body>

A FILM TO REMEMBER: “MISSISSIPPI BURNING” (1988)

Photograph of film poster with a display of scene images from “Mississippi Burning”.

Before I get into this, I want to make mention “A FILM TO REMEMBER” will be a series about films that have reached a milestone anniversary since their origin in being culturally, historically, or aesthetically significant. The articles will contain the film’s plot outline, director, cast, a compilation of trivialities, various photos, movie trailer, critical reception and more. So, let’s start:

We are here to mark the celebration of the 30th Anniversary of Alan Parker’s “Mississippi Burning”. Let’s take an inside look at the film:

PLOT OUTLINE:

Two FBI agents assigned to investigate the disappearance of three civil rights workers in fictional Jessup County, Mississippi. The investigation is met with hostility and backlash by the town’s residents, local police, and the Ku Klux Klan (KKK).

Still image of filmmaker Alan Parker.

STUDIO:

Orion Pictures

DIRECTOR:

Alan Parker

CAST:

  • Gene Hackman … Agent Rupert Anderson
  • Willem Dafoe … Agent Alan Ward
  • Frances McDormand … Mrs. Pell
  • Brad Dourif … Deputy Sheriff Clinton Pell
  • R. Lee Ermey … Mayor Tilman
  • Gailard Sartain … Sheriff Ray Stuckey
  • Stephen Tobolowsky … Clayton Townley
  • Michael Rooker … Frank Bailey
  • Pruitt Taylor Vince … Lester Cowens
  • Badja Djola … Agent Monk
  • Kevin Dunn … Agent Bird
  • Frankie Faison … Eulogist
  • Geoffrey Nauffts … Goatee
  • Rick Zieff … Passenger
  • Christopher White … Black passenger
  • Park Overall … Connie
  • Darius McCrary … Aaron Williams
  • Robert F. Colesberry … Cameraman
  • Frederick Zollo … Reporter
  • Tobin Bell … Agent Stokes
  • Bob Glaudini … Agent Nash

GENRE(S):

Crime | Drama | History | Mystery | Thriller

TAGLINE:

1964. When America was at war with itself.

Still image of the Mississippi murder car chase in “Mississippi Burning”.

The film is known for surveying the geography of racism, shedding light on the dark night of the soul as director Alan Parker operates without depending on flashy visual tropes in this slick, well-acted thriller with subtle performances from Gene Hackman, Willem Dafoe and Frances McDormand while nonetheless distorting the facts and looks at the civil rights movement from a strictly white perspective. The film is loosely based on the 1964 Chaney, Goodman, and Schwerner murder investigation in Mississippi, it received a mixed reception as the performances were generally praised but the feature became embroiled in controversy. It was heavily criticized by African-American activists involved in the civil rights movement and the families of Chaney, Goodman, and Schwerner for its fictionalization of its history.

Here’s what some of the critical receptions have been for the film over the years:

Gene Siskel from Chicago Tribune says: “Gene Hackman and Willem Dafoe give subtle performances but its Frances McDormand who was the most effective as the film’s moral conscience”

Pauline Kael from The New Yorker says: “The acting is admirably stalwart in a film where it’s garish forms of violence are morally repugnant.”

Desson Howe from Washington Post says: “‘Mississippi Burning’ speeds down the complicated, painful path of civil rights in search of a good thriller. Surprisingly, it finds it.”

Jack E. White from TIME Magazine says: “This is just another Mississippi whitewash giving a cinematic lynching of the truth.”

Roger Ebert from Chicago Sun-Times says: “‘Mississippi Burning’ feels like a movie made from the inside out, a movie that knows the ways and people of its small Southern city so intimately that, having seen it, I know the place I’d go for a cup of coffee and the place I’d steer clear from.”

Still image of a Ku Klux Klan meeting in “Mississippi Burning”.

As you can tell by the critical reactions, the film garnered a mixed response do to the fictionalization of the historical events and its narrow scope with the use of the white savior narrative came with some harsh criticism. But the film doesn’t pretend to be about the Civil Rights workers themselves as to being more of an investigative law and order procedural instead. Parker pushes everything along at a fervent clip, embedded with an admirable cast and noble performances by Hackman, Dafoe and McDormand with character scenes back-to-back with chases or violence that is compelling in depicting a meritable and ethical message of what kinds of currents were in the air in 1964 despite the film’s partisan misrepresentation of the verifiable details in another wise, tense filled, commendable crime drama. But I’ll let you decide…

So, to get a better look at the film, here’s a link to the movie trailer of Alan Parker’s “Mississippi Burning”:

Here I have provided 12 interesting and intriguing trivia facts (I wanted to keep it limited) about “Mississippi Burning”:

  • The film is inspired by the murder by the Ku Klux Klan of voting rights activists James Chaney, Michael Schwerner, and Andrew Goodman.
  • At one point, Gene Hackman decided that he would no longer make more violent films, after seeing a brief and violent clip of his performance in this film (and taken out of context, he thought) at the 1989 Academy Awards. That stance prevented him from accepting a future job as director of “The Silence of the Lambs” (1991) and almost cost him the Sheriff role in “Unforgiven” (1992), which he reluctantly accepted after being convinced by Clint Eastwood, a role that earned great acclaim, and his second Oscar.
  • During the filming of the racists versus reporters scenes on a bridge over the Big Black River near Bovina, Mississippi, two extras were nearly killed by a train when they ventured from a holding area onto a tall concrete-arch railroad bridge. They narrowly escaped injury by huddling on a tiny pedestal on the bridge’s edge.
  • Interior shots in the Sheriff’s office, courtroom, and stairs from the courtroom were filmed in the old Carroll County courthouse in Vaiden, Mississippi. Built in 1905, the building was in such disrepair, that crew and extras had to dodge falling bricks during filming. Though slated for listing in the National Register of Historic Places, the courthouse has been demolished.
  • Samuel L. Jackson auditioned for a role, but was turned down by Alan Parker, who thought he didn’t sound Southern enough. In fact, Jackson grew up in Chattanooga, Tennessee.
  • Don Johnson campaigned heavily for the role of Agent Alan Ward that went to Willem Dafoe.
Still image of a house ablaze in “Mississippi Burning”.
  • Filmmakers Milos Forman and John Schlesinger were considered to direct before Alan Parker was chosen.
  • A Klansman in a red car with tall fins and white roof throws a victim out of the door in the town square. The car is a 1961 DeSoto, the very last edition of the historic make. Rumors that the Chrysler Corporation (DeSoto’s parent company) decided to drop the line, because of its association with the Klan are untrue. DeSoto’s sales had been steadily declining since 1955, and Chrysler decided that the 1961 model would be its last.
  • Many of the extras participating in Clayton Townley’s speech scene, were actual members of the Ku Klux Klan, and used their clan membership cards as ID.
  • The news interview clips were filmed by the film’s director Alan Parker, with real locals from Mississippi, and their lines were ad-libbed with only minor prompting. Parker said it was at times an uncomfortable experience, since he wasn’t always sure if they didn’t believe what they were saying.
  • Frances McDormand’s character, Mrs. Pell, is based on Connor Price, the wife of Sheriff Cecil Ray Price.
  • Alan Parker and his crew whipped up batches of what they called “OMD” or “Old Man’s Dick”. This ugly mix of purple, yellow, and brown was painted on every piece of set, every chair, every table top, every prop. They made up a dye, and dipped costumes into it, everyone’s from the FBI Agents, the white supremacists, and the black civil rights campaigners, who are murdered at the start. Stephen Tobolowsky (Clayton Townley) saw the process first hand, then went to the film’s premiere, and wondered why the stuff wasn’t showing up on-screen. Parker ambushed him afterwards and asked him, “What did you see?”. Tobolowsky said he hadn’t seen “OMD” Parker replied, “I didn’t ask you what you didn’t see, I asked you what you saw.” Tobolowsky suddenly realized his eyes were drawn to the black actor’s skin. “Alan’s face turned a lovely red, and he said, ‘Right’,” Tobolowsky said. The only thing “OMD” didn’t touch was human skin. You watch the film, and the “OMD” is invisible, but it gives everything, except human skin, a dull sameness, that makes your eyes look elsewhere, to human skin, the most important visual in a film about racism.
Still image of Gene Hackman and Willem Dafoe in “Mississippi Burning”.

To conclude, Alan Parker’s “Mississippi Burning” starts out as a vivid portrait of the Civil Rights era and ends up a cop drama in which vengeful anger is used against racist killers. While the film may be muddled in fictionalize details of its events, it doesn’t strain to present a story based on the facts nor be a documentary but what it evokes more clearly than anything else, is how recently in our past, those certain inalienable rights were routinely and legally denied to African-Americans, particularly in the South. Alan Parker understates the obstinate maliciousness in the feature in a controlled but excitingly and visually arresting, charged with powerful images, sustained effectively with layered noteworthy performances particularly from Gene Hackman, Willem Dafoe and Frances McDormand in a gritty, violent, tension brimmed, Jim Crow crime thriller.

NOTE: The article contains sources from IMDb and Wikipedia.

Follow me and check out other articles of mine:

Movies
History
Trivia
Photos
Movie Trailer
Recommended from ReadMedium