A few weeks ago I got this off-the-wall PR pitch: use counter-terrorism tech to pick better wines! So, obviously, I had to learn more. Turns out, Alex Fishman is excited about the world of wine -- so excited he launched a wine app called Delectable which claims it's approaching 1 million users and has "the world's largest database of over 2 million wines." He's also a former "forward deployed engineer" for behemoth data mining intelligence firm Palantir.

And during an interview with The Switch, Fishman spent more time talking about Palantir than the app itself -- although that could be partially attributed to the questions asked. Of course, many of the technologies developed initially for the national security space eventually are adapted for the consumers space, like say, the Internet. But it's a telling statement about the level of notability and notoriety Palantir has achieved that even the most seemingly divergent uses of data mining developed by former employees are trading on its name.

Started in 2004 by former Paypal co-founder and early Facebook investor Peter Thiel, Alex Karp, Joe Lonsdale, Stephen Cohen and Nathan Gettings, Palantir derives its name from the crystal ball-like stone spheres in the "Lord of the Rings" series. In Tolkien lore the name literally means "farsighted" or "one that sees from afar," which pretty aptly describes how Palantir software combines intelligence sources and databases to derive detailed maps of how people and companies are connected.

If you in live the D.C. area, you'll be familiar with at least with the name of the company if not its products thanks to the Palantir ads that frequently plaster metro stops -- especially those near the Pentagon. And with good reason: A recent Forbes profile of Karp, currently Palantir's chief executive, described the company as the "go-to company for mining massive data sets for intelligence and law enforcement applications."

The company counts the CIA, FBI, NSA, and a slew of other military and law enforcement agencies among its clients. The CIA was even an early investor through its In-Q-Tel venture fund. Major intelligence community figures like former secretary of state Condoleezza Rice and former CIA director George Tenet are among the company's advisers. Fishman described the mission of the company as "to use technology to fight terrorism."

Their analytic software also has been deployed for non-profit groups and government fraud prevention, and has been adopted by a variety of private sector clients. In fact, Andy Greenberg at Forbes says that private-sector deals now account for around 60 percent of Palantir's revenue. And that revenue is substantial: Forbes estimated it will reach $450 million this year, up from less than $300 million in 2012.

E-mails from cybersecurity contractor HBGary leaked by Anonymous in 2011 revealed some disconcerting details about the company's work for private clients. Particularly, that Palantir was among a group called Team Themis recruited by the law firm Hunton & Williams to propose ways of subverting or sabotaging WikiLeaks on behalf of Bank of America. The same group was reportedly also recruited to create a pitch for the U.S. Chamber of Commerce that involved creating online personas to deliver fake documents to progressive groups in a plot to discredit them. Karp later released a statement apologizing for Palantir's involvement with the Wikileaks plan.

Fishman's relationship with Palantir started in 2008 when he was working on quantitative investment strategies for Goldman Sachs. After a friend of his suggested he check out Palantir and sent him a link to Peter Thiel's Wikipedia page, Fishman went to California for an interview. There, he says, he was immediately impressed by the team and the big data initiatives it was working on. After starting on the team dealing with financial services, he helped launch the open government team.

So how do you make the transition from working in deep data mining to trying to sell wine?

"I was very fortunate at my job in Palantir to eat at some of the best restaurants in the world," Fishman explains, adding "I think the mission of Palantir is very important, and I love the team and love the product[...] but I didn't feel that I was born to work with government agencies."

So he started looking at how to take the Palantir approach to consumer technologies -- a field he and his co-workers at the data mining giant "used to sometimes make fun of." And he brought in some friends from Palantir as investors, including Karp and Lonsdale. In fact, he calls Karp his mentor.

The result? "We used a lot of the same technologies that Palantir discovered and employs currently with their intelligence clients" and applied them to creating a huge dataset of wine makers, says Fishman. 

One of the "key parts" of Palantir, according to Fishman, "is being able to integrate lots and lots of databases in a way that actually makes sense." And while it might seem easy to create a big data set of all of the wines out there, Fishman argues it's not. He says he had to use very similar datamining practices to create his wine dataset because "actually it's really hard" to make a list of all wines in an authoritative way because the market is so, if you will forgive the pun, fluid: since there are constantly more wines being created, the dataset needs to be able to change with the market.

Delectable takes that dataset and works by creating a profile of a user's wine tastes then giving personalized recommendations, letting users review wines and share their favorites. It also uses photo recognition to tie bottles to the database, give more information about a wine's origin, and offer an option to order a bottle through the app.

So the real terrorism tracking technology-wine app connection is about dataset management.