News for hackers. Stuff that matters.

aicharades

Re:Show HN: ChatGPT and Document Parser = Ghost on Tuesday March 07, 2023 @04:11PM (#35061279)
Here's a free notebook for map reduce summarization I created: https://www.wrotescan.com

It's byok. Keys are not persisted. You can choose chat-gpt-turbo or text-davinci.

Limit is 2.4M tokens per call, working to get higher too.

Re:Berkshire Hathaway Shareholder letter 2022 [pdf] on Saturday February 25, 2023 @11:32AM (#34937895)
Meta letter based on all of Warren buffet’s shareholder letters from 1979-2019:

Here's a horror movie based on all of Warren Buffet’s Shareholder Letters from 1977 - 2019

Input: https://medium.com/@r44d/every-berkshire-hathaway-shareholde...

------------------------

Prompts:

Map Prompt

'Instructions': I want you to act as a screenwriter. You will develop an engaging and creative story outline for a horror feature length film that can captivate its viewers. You have been given an except of a collection of Warren Buffet’s shareholder letters that you must use as source material. The film’s genre must be horror. Start with coming up with interesting characters from the excerpt, the setting of the story, dialogues between the characters etc. Once your character development is complete, create an exciting storyline filled with twists and turns that keeps the viewers in suspense until the end. Note the full names of characters every time they are mentioned. Note location names.

The summary must be no longer than 650 characters long. \n

'Input': {text} \n

'Output':

Reduce Prompt

'Instructions': You are a copyeditor. Combine the below summaries into one cohesive narrative. The combined output must be a story less than 4,000 characters long. Keep the content and context preserved. \n

'Input': {text} \n

'Output':

------------------------

Output: Mrs. Blumkin, a 93 year old Board Chairwoman, is the only one who can save the world from a mysterious force. With the help of her progeny, she must battle the darkness and uncover the secrets of the Courier-Express, Nebraska Furniture Mart, See's Candies, World Book, and Kirby. Along the way, she discovers the power of family and the strength of her own courage.

Charlie and Warren stumble upon a mysterious collection of Warren Buffet's shareholder letters. After reading the letters, they discover the existence of a supernatural being, Mr. Market, who offers them mouth-watering opportunities in exchange for their souls. They must battle against Mr. Market and his minions to save their lives and the world.

The group soon discovers that the company is using dark magic to gain immense wealth and power. With the help of Mrs. B, the 96-year-old founder of the Nebraska Furniture Mart, they must stop the company before it's too late. Along the way, they must battle a ruthless businessman and his henchmen.

When a hurricane causes massive losses, primary insurers and reinsurers are left with financial stakes in each loss settlement. Enter Berkshire Hathaway, who offers to write up to $250 million of catastrophe coverage. When rates become attractive, they book a substantial amount of business. But when losses exceed the retained amount, the reinsurers pay 95% of the excess up to its contractual limit, leaving the primary insurer with a financial stake in each loss. With a huge sum on the line, the stakes are high and the horror begins.

The group soon realizes that the letters contain clues to a mysterious and powerful force that has been manipulating the world's economy for centuries. As they investigate further, they come face to face with a terrifying supernatural entity that will stop at nothing to protect its secrets. With the help of Roberto Goizueta, the former CEO of Coca-Cola, they must find a way to stop the evil before it's too late. Rich Santulli, the CEO of NetJets, is a brilliant executive but also a mysterious figure. When his Aunt Alice asks him if she can afford a fur coat, he replies with a cryptic answer that sets the stage for a horror story.

The group must decipher the clues and battle the dark forces to save the town and themselves. Along the way, they must face off against Tony, a ruthless businessman who is determined to keep the power for himself. With the help of The Washington Post Company, Wells Fargo & Company, and American Express Company, the group must unravel the mystery and save the town.

Tony and Rod, two insurance executives, are tasked with increasing their policy count. When they discover a series of underreported losses, they uncover a sinister plot involving embezzlement and product liability. As they investigate further, they realize the losses are connected to a mysterious figure from the past. With the help of John, Tom, Michael, Don, and Don, they must unravel the secrets of the past before it's too late.

Finally, the group discovers that their investments have unleashed a supernatural force. As they try to stop the force, they must battle the mysterious entity and its minions in a race against time to save the world from destruction. With the help of Jim Kilts, the former CEO of Gillette, they must find a way to stop the evil before it destroys them all. With twists and turns that keep viewers in suspense until the end, this horror film will captivate its audience. Will they be able to save the world before it's too late? With their lives on the line, they must fight to uncover the truth and save the world from the dark force. Will they make it out alive?

Re:Big Data Is Dead on Tuesday February 07, 2023 @03:35PM (#34699127)
Large context for LLMs might change that.

I've been using LangChain and was really interested in how this could summarize primary sources, so I ran it on Hillary Clinton's emails. This was over unstructured PDF documents uploaded directly from pymupdf to OpenAI LLM through LangChain. ------------------------

A Storyteller Summarizes Hillary Clinton’s Emails

Input: Raw PDF of 2016 Democratic National Committee email leak

------------------------

Prompt: I want you to act as a storyteller. You will come up with entertaining stories that are engaging, imaginative and captivating for the audience based on the summary text provided. It can be fairy tales, educational stories or any other type of stories which has the potential to capture people's attention and imagination. You have been given a section of a large set of emails to summarize and come up with an entertaining story.

------------------------

Output: Once upon a time, there was a group of diplomats working hard to make the world a better place. They had been discussing how to gain leverage over the Pakistanis to move them to more aggressively pursue Al-Qaeda. After much deliberation, they decided to use a combination of incentives and coercive measures to try to get the Pakistanis to cooperate. They offered incentives such as increased control over how Kerry-Lugar money was used and increased support for counterinsurgency capabilities. They also used coercive measures such as targeting military leaders who gave support to Al-Qaeda and its allies, and attempting to reduce Pakistani anxieties about the Indian front. In the end, their efforts paid off and the Pakistanis began to cooperate more with their mission. The diplomats had succeeded in making the world a better place.

The story follows Hillary as she juggles her busy schedule, responding to requests from her colleagues and friends. She is always willing to help, and her dedication to her work is evident. Despite her busy schedule, she is still able to find time to help those around her. A powerful leader was tasked with finding out whether a senator supported the surge in Iraq and obtaining a copy of his recent speech about troops to Afghanistan. The leader reached out to her team for help, and they worked together to draft a memo outlining four strategic interests, three of which overlapped with the leader's goals. With the help of her team, the leader was able to obtain the information she needed and use it to make a positive impact.

President Obama was faced with the challenge of how to win the war in Afghanistan without causing too much destruction and civilian casualties. He decided to increase the size of the Afghan army and police force, and to pay them better wages so they could live comfortably. He also decided to send more US Special Forces and tens of thousands of troops to the region. Despite these efforts, the Taliban continued to gain strength and support from the Pashtun community. Obama realized that he needed to find a better solution. He decided to focus on carefully thought out measures such as providing better pay for the Afghan army and police, and using diplomacy to negotiate with the Taliban. In the end, Obama was able to find a peaceful solution that allowed the US to win the war without causing too much destruction.

A Prime Minister of a country had a fear of losing his sight due to a childhood rugby injury. He had his eyes checked and it was found that he had two minor tears in his retina. He visited the world-renowned Moorfields Hospital for further examinations and the doctors decided against any further operations. The Prime Minister was grateful to the doctors and staff of the NHS, especially Moorfields Hospital. Meanwhile, the US Secretary of State was in contact with the Foreign Minister of Honduras to discuss the situation in the country. She asked her staff to call the US Congressman Payne to update him on the situation. Through her diplomatic efforts, she was able to make a positive impact on the lives of many.

A small island nation called Haiti faced many challenges, but the people of Haiti were determined to build a stable, prosperous and democratic future. The United Nations appointed President Clinton as a special envoy to Haiti, and he appointed Dr. Paul Farmer as the Deputy U.N. Special Envoy. Dr. Farmer had dedicated his life to helping the people of Haiti for the past 20 years. Despite the efforts of the U.S., U.N. and other countries, Haiti still faced many challenges. To help the people of Haiti, the U.S. State Department took a closer look at the challenges and Secretary Clinton's chief of staff briefed Members on the initial findings. The U.S. hoped to better target and coordinate assistance, engage the Haitian Diaspora, and make assistance sustainable. To help the people of Haiti, the U.S. proposed granting temporary protected status to Haitians living in the U.S. and included Haiti in security initiatives such as the Merida Initiative. With the help of the U.S., U.N. and other countries, the people of Haiti could build a brighter future.

There was also a great conflict between two powerful nations, Morocco and Guinea, over a passport that had been taken away from a citizen of Guinea. The leaders of the United States and France stepped in to help and offered ideas to help the two nations come to a resolution, but the leaders of Morocco and Guinea were still unable to come to an agreement. The leaders of the United States and France then decided to meet in Paris to discuss the situation further and were able to broker a deal between Morocco and Guinea, returning the passport to its rightful owner.

There was also a man named Tom who was nominated for a prestigious position, but his nomination was held up due to a disagreement between two powerful forces. A brave negotiator was able to convince the two sides to lift the hold on Tom's nomination, allowing him to achieve his dream.

Re:OpenAI-to-SQLite by Simonw on Tuesday February 07, 2023 @07:55AM (#34692101)
Is there a standard library for extracting data in a consistent format from OpenAI queries yet? And testing the results?

Currently using LangChain

I was really interested in how this could summarize primary sources, so I ran it on Hillary Clinton's emails.

------------------------

A Storyteller Summarizes Hillary Clinton’s Emails

Input: Raw PDF of 2016 Democratic National Committee email leak

------------------------

Prompt: I want you to act as a storyteller. You will come up with entertaining stories that are engaging, imaginative and captivating for the audience based on the summary text provided. It can be fairy tales, educational stories or any other type of stories which has the potential to capture people's attention and imagination. You have been given a section of a large set of emails to summarize and come up with an entertaining story.

------------------------

Output: Once upon a time, there was a group of diplomats working hard to make the world a better place. They had been discussing how to gain leverage over the Pakistanis to move them to more aggressively pursue Al-Qaeda. After much deliberation, they decided to use a combination of incentives and coercive measures to try to get the Pakistanis to cooperate. They offered incentives such as increased control over how Kerry-Lugar money was used and increased support for counterinsurgency capabilities. They also used coercive measures such as targeting military leaders who gave support to Al-Qaeda and its allies, and attempting to reduce Pakistani anxieties about the Indian front. In the end, their efforts paid off and the Pakistanis began to cooperate more with their mission. The diplomats had succeeded in making the world a better place.

The story follows Hillary as she juggles her busy schedule, responding to requests from her colleagues and friends. She is always willing to help, and her dedication to her work is evident. Despite her busy schedule, she is still able to find time to help those around her. A powerful leader was tasked with finding out whether a senator supported the surge in Iraq and obtaining a copy of his recent speech about troops to Afghanistan. The leader reached out to her team for help, and they worked together to draft a memo outlining four strategic interests, three of which overlapped with the leader's goals. With the help of her team, the leader was able to obtain the information she needed and use it to make a positive impact.

President Obama was faced with the challenge of how to win the war in Afghanistan without causing too much destruction and civilian casualties. He decided to increase the size of the Afghan army and police force, and to pay them better wages so they could live comfortably. He also decided to send more US Special Forces and tens of thousands of troops to the region. Despite these efforts, the Taliban continued to gain strength and support from the Pashtun community. Obama realized that he needed to find a better solution. He decided to focus on carefully thought out measures such as providing better pay for the Afghan army and police, and using diplomacy to negotiate with the Taliban. In the end, Obama was able to find a peaceful solution that allowed the US to win the war without causing too much destruction.

A Prime Minister of a country had a fear of losing his sight due to a childhood rugby injury. He had his eyes checked and it was found that he had two minor tears in his retina. He visited the world-renowned Moorfields Hospital for further examinations and the doctors decided against any further operations. The Prime Minister was grateful to the doctors and staff of the NHS, especially Moorfields Hospital. Meanwhile, the US Secretary of State was in contact with the Foreign Minister of Honduras to discuss the situation in the country. She asked her staff to call the US Congressman Payne to update him on the situation. Through her diplomatic efforts, she was able to make a positive impact on the lives of many.

A small island nation called Haiti faced many challenges, but the people of Haiti were determined to build a stable, prosperous and democratic future. The United Nations appointed President Clinton as a special envoy to Haiti, and he appointed Dr. Paul Farmer as the Deputy U.N. Special Envoy. Dr. Farmer had dedicated his life to helping the people of Haiti for the past 20 years. Despite the efforts of the U.S., U.N. and other countries, Haiti still faced many challenges. To help the people of Haiti, the U.S. State Department took a closer look at the challenges and Secretary Clinton's chief of staff briefed Members on the initial findings. The U.S. hoped to better target and coordinate assistance, engage the Haitian Diaspora, and make assistance sustainable. To help the people of Haiti, the U.S. proposed granting temporary protected status to Haitians living in the U.S. and included Haiti in security initiatives such as the Merida Initiative. With the help of the U.S., U.N. and other countries, the people of Haiti could build a brighter future.

There was also a great conflict between two powerful nations, Morocco and Guinea, over a passport that had been taken away from a citizen of Guinea. The leaders of the United States and France stepped in to help and offered ideas to help the two nations come to a resolution, but the leaders of Morocco and Guinea were still unable to come to an agreement. The leaders of the United States and France then decided to meet in Paris to discuss the situation further and were able to broker a deal between Morocco and Guinea, returning the passport to its rightful owner.

There was also a man named Tom who was nominated for a prestigious position, but his nomination was held up due to a disagreement between two powerful forces. A brave negotiator was able to convince the two sides to lift the hold on Tom's nomination, allowing him to achieve his dream.

Here are a few sample prompts I found worked well for the mapping step:

Writer: Prompt: You are the writer Frank Herbert. Write a summary of a section of Dune based on the following input. The summary must be no longer than 650 characters long

Banker : Prompt: You are an investment banker. Write a company description in the style of a CIM based on a summary of the following section of an SEC filing. Focus on the company's operations. Do not use first person.

Storyteller : Prompt: You are a writer. Write a new story based on the section of a larger story you've been given. Include the character Equity Private and any employees of her private equity firm. Try to identify who Equity Private could be at the end of your story.

Show HN: GPTBanker – map/reduce over documents of any length with OpenAI

https://www.wrotescan.com

Hi all! I created a app that can map/reduce over documents of an arbitrary length with OpenAI completions.You can enter in your OpenAI key and try it out.The backend is built with LangChain, which made it easy to manage the models, workflows (chains), and troubleshoot pipelines with buffer issues.Learnings: - Tokens was the most helpful key for calls rather than characters or words. LangChain...

( Read More... | 2 comments | on HN )