Showing posts with label AI. Show all posts
Showing posts with label AI. Show all posts

Monday, August 04, 2025

Apple's ai opportunity is context

I use Perplexity as my $20/m answer engine -- and for generic ai tasks. I don't want Perplexity as a longterm ai provider, but I do like being able to experiment with different models. Currently all the leading not-free models are pretty good, but some are more sycophantic than others. I dislike sycophancy; ChatGPT and Sonnet have less of it than Gemini but all are too eager to please (prompts help but one has to be careful not to reveal a preference for a particular response).

For me, at this time, all of the models work significantly better with quite a bit of context. In Perplexity that context is provided in Spaces. Spaces include reference material and the model/prompt settings for the Space.

The great mass of people are not going to do that sort of context work. So vendors are trying to answer questions and apply (lower cost) models without context. Meanwhile they try to scrape together a lot of knowledge about the user from whatever source they get.

Apple's opportunity is they can assemble a lot of context. In my case GBs of information on my main drive, not to mention my calendars, contacts, notes and so on. Apple could ask questions to provide a general default context, such as preference for sycophancy, references to use, web resources, textbooks and so on. 

I consider Apple to be a broken company. I don't think they will be able to get their ai act together under Cook. But if they can, they do have advantages.

Sunday, July 20, 2025

Tip: Let your ai tell you what's new and novel in an iOS or macOS release

I like to wait a month (iOS) or six months (macOS) before applying major updates. By the time I apply them all the useful tips and tricks I read along the way are ancient history.

Instead of trying to keep track of these things before the OS is installed wait until you are ready to pull the trigger. Then ask your ($20/m) ai to summarize known issues and interesting new features, tips and tricks. You can provide context as needed (ex: I am an expert user, etc).

PS. Apple got away from providing PDF versions of manuals and user guides -- but if they still did that I'd drop the PDFs into my Perplexity macOS Space.

Tuesday, February 27, 2024

Extracting core concepts with ChatGPT 4 from OCR of scanned sample examination PDF - Feb 2024

I think this is an interesting example of what works and doesn't work on the personal AI front in early 2024.

My son was given a printed practice exam in microeconomics. I wanted ChatGPT 4 to extract and summarize the core concepts. This turned out to require two steps, one of which only worked with Google.

Step One: OCR and download text file

I scanned the document in ScanSnap and produced a scan PDF. I tried getting ChatGPT to do the OCR but it abandoned that task. I then tried Gemini and it told me it didn't do OCR. Next I tried Microsoft Lens, but it seemed to only do OCR from a local image, I couldn't see how to use it with a OneDrive PDF. ChatGPT claimed that I could open a OneDrive PDF in Office 365 Word but that did not work with the web version (perhaps it works with full Word?). ChatGPT did not know of a way to do PDF OCR on Sonoma.

The only thing that worked was Google Drive. It allowed me to open the PDF in Google Docs and then export a .txt version.

Step Two: ChatGPT 4 analysis

I asked ChatGPT 4 to extract the key concepts from the .txt file. It provided a plausible set and then proceeded to answer some of the exam questions. Concepts captured were:
... equilibrium price, consumer's surplus, producer's surplus, total surplus, efficient output levels, negative externalities, deadweight loss (DWL), price ceilings, and the impact of taxes on market outcomes ...

I don't think it added much to the textbook chapter topic loss but it did provide a plausible set of topics to emphasize in my son's studying. I was primarily interested in the workflow today. It will be interesting to look back on this in a year and see what's different.

Saturday, January 06, 2024

Rendering ChatGPT output in readable form in a Juypter Notebook

Update: This post is still useful, but there's also a way to enable line wrap in Visual Studio Code's Jupyter extension. You can also use the Python Print function instead of the Display example in my original post. For example:

output = client.completions.create(
    model="gpt-3.5-turbo-instruct",
    prompt="List the days of the week: ",
    max_tokens=100,
    stop = "Saturday", #put this in for fun
)
print(output.choices[0].text)

Note these print parameters are specific to this particular object's structure. (I think JSON but I'm a newbie.)

Original below
--------

This was a bit of a revelation. I don't know Python but I've been working through a ChatGPT / LLM tutorial using Visual Studio Code and a Juypter Notebook on macOS. In a Jupyter cell the output renders below the cell and it looks like this:

Completion(id='cmpl-....', choices=[CompletionChoice(finish_reason='stop', index=0, logprobs=None, text='1...

All in one unreadable line with \n as a paragraph deliver and no line wrap.

I asked ChatGPT 4 to help. Over a series of interactions I tried different things and got various error messages I passed to ChatGPT 4. In turn it analyzed my error message and suggested fixes.

This is what I ended up with in about 15 minutes, here added to a cell that ran a simple prompt query

from IPython.display import display, HTML

output = client.completions.create(

    model="gpt-3.5-turbo-instruct",

    prompt="write me a poem",

    max_tokens=100,

    n=3

)

text_content = output.choices[0].text if output.choices else ""

html_output = text_content.replace('\n', '<br>')

display(HTML(html_output))

This is what the output looks like now (the poetry is greeting card quality and mildly painful):

A poem, a weave of words and rhyme

A tapestry of thoughts and time

A magic spell from the poet's pen

A story of love, of loss, of when


The stars above, they guide my hand

As I write of distant lands

Of fiery sunsets and ocean tides

Of moments we hold and let slip by ...   

[Adolescent poetry truncated] 

This screenshot shows it best ...


We are in a new world.